diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr46107.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr46107.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46107.c b/gcc/testsuite/gcc.c-torture/compile/pr46107.c new file mode 100644 index 000000000..41582b8a1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr46107.c @@ -0,0 +1,16 @@ +/* PR tree-optimization/46107 */ + +int foo (void) __attribute__ ((noreturn)); + +void +bar (int x, int *y, int z) +{ + static void *j[] = { &&l1, &&l2 }; +l1: + if (*y) + goto *j[z]; + foo (); +l2: + *y ^= (x & 1) ? -1 : 0; + goto *j[x]; +} |