summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr105337.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr105337.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr105337.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr105337.c b/gcc/testsuite/gcc.dg/torture/pr105337.c
new file mode 100644
index 00000000000..4a0bdf0363c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr105337.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+__attribute__((noipa)) void
+bar (int x)
+{
+ (void) x;
+}
+
+int a;
+
+int
+foo (void)
+{
+ int b, c;
+ for (b = 0; b < 3; b++)
+ {
+ if (!a)
+ break;
+ c--;
+ bar (c);
+ }
+ return b;
+}
+
+int
+main ()
+{
+ if (foo ())
+ __builtin_abort ();
+ return 0;
+}