diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/920501-4.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/920501-4.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-4.c b/gcc/testsuite/gcc.c-torture/execute/920501-4.c new file mode 100644 index 000000000..3524dd5c8 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/920501-4.c @@ -0,0 +1,27 @@ +#ifndef NO_LABEL_VALUES +int +x (int i) +{ + static const void *j[] = {&& x, && y, && z}; + + goto *j[i]; + + x: return 2; + y: return 3; + z: return 5; +} + +int +main (void) +{ + if ( x (0) != 2 + || x (1) != 3 + || x (2) != 5) + abort (); + + exit (0); +} +#else +int +main (void) { exit (0); } +#endif |