summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr45259.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr45259.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr45259.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr45259.c b/gcc/testsuite/gcc.dg/pr45259.c
new file mode 100644
index 000000000..b8dc36503
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr45259.c
@@ -0,0 +1,42 @@
+/* PR debug/45259 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2 -fpic -w" { target fpic } } */
+
+struct S { void (*bar) (long); };
+struct T { struct S *t; };
+int w;
+extern int baz (int);
+
+void
+foo (int x, int u, char *z)
+{
+ struct T *v;
+ static void *y[256] = { &&l1, &&l2 };
+ for (;;)
+ switch (x)
+ {
+ l2:
+ x = 9;
+ case 9:
+ goto *y[*z++];
+ case 10:
+ case 27:
+ case 54:
+ case 99:
+ case 100:
+ case 120:
+ case 122:
+ case 131:
+ case 132:
+ case 134:
+ case 141:
+ case 142:
+ v->t->bar (u);
+ v->t->bar (u);
+ case 143:
+ continue;
+ l1:
+ default:
+ baz (w);
+ }
+}