aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr70152.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr70152.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr70152.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr70152.c b/gcc/testsuite/gcc.dg/pr70152.c
new file mode 100644
index 00000000000..27a092d199a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr70152.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/70152 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a;
+int foo (void);
+int setjmp (char *);
+char buf[64];
+
+static int
+bar (int x)
+{
+ x = 0;
+ setjmp (buf);
+ for (;;)
+ {
+ switch (x)
+ case 5:
+ x = foo ();
+ }
+}
+
+void
+baz (void)
+{
+ bar (a);
+}