summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr41345.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr41345.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr41345.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr41345.c b/gcc/testsuite/gcc.dg/pr41345.c
new file mode 100644
index 00000000000..4b146c0c202
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41345.c
@@ -0,0 +1,14 @@
+/* PR bootstrap/41345 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -fcompare-debug" } */
+
+void
+foo (int *x)
+{
+ int a;
+ for (a = 0; a < 2; a++)
+ if (x[a])
+ goto lab;
+ __builtin_unreachable ();
+lab:;
+}