diff options
Diffstat (limited to 'gcc/testsuite')
| -rw-r--r-- | gcc/testsuite/gcc.dg/pr122773.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr122773.c b/gcc/testsuite/gcc.dg/pr122773.c new file mode 100644 index 00000000000..a3860e9c7a2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr122773.c @@ -0,0 +1,25 @@ +/* PR middle-end/122773 */ +/* { dg-do compile } */ +/* { dg-options "-Wimplicit-fallthrough -O2 -ftrivial-auto-var-init=zero" } */ + +void *l; +int +foo (int x) +{ + __label__ l1, l2, l3; + static void *l[] = { &&l1, &&l2, &&l3 }; + switch (0) + { + case 0: + while (0) + ; + goto *l[x]; + } + l1: + ++x; + l2: + ++x; + l3: + ++x; + return x; +} |
