Files
TheRock/debug-tools/rocgdb/source/ld/testsuite/ld-sh/sh2.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

121 lines
1.4 KiB
C

int global;
extern void trap (int, int);
static void quit (int);
static int foo (int);
int
main ()
{
if (foo (0) != 0 || global != 0)
quit (1);
if (foo (1) != 1 || global != 1)
quit (1);
if (foo (2) != 2 || global != 2)
quit (1);
if (foo (3) != 3 || global != 3)
quit (1);
if (foo (4) != 4 || global != 4)
quit (1);
if (foo (5) != 5 || global != 5)
quit (1);
if (foo (6) != 6 || global != 6)
quit (1);
if (foo (7) != 7 || global != 7)
quit (1);
if (foo (8) != 8 || global != 8)
quit (1);
quit (0);
}
void
__main ()
{
}
static void
quit (int status)
{
trap (1, status);
}
int
bar (int i)
{
global = i;
return i;
}
int
bar0 (int i)
{
global = 0;
return i;
}
int
bar1 (int i)
{
global = 1;
return i;
}
int
bar2 (int i)
{
global = 2;
return i;
}
int
bar3 (int i)
{
global = 3;
return i;
}
int
bar4 (int i)
{
global = 4;
return i;
}
int
bar5 (int i)
{
global = 5;
return i;
}
int
bar6 (int i)
{
global = 6;
return i;
}
int
bar7 (int i)
{
global = 7;
return i;
}
int
foo (int i)
{
switch (i)
{
case 0: bar0 (0); return 0;
case 1: bar1 (1); return 1;
case 2: bar2 (2); return 2;
case 3: bar3 (3); return 3;
case 4: bar4 (4); return 4;
case 5: bar5 (5); return 5;
case 6: bar6 (6); return 6;
case 7: bar7 (7); return 7;
default: return bar (i);
}
}