aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr117979.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr117979.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr117979.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr117979.c b/gcc/testsuite/gcc.dg/torture/pr117979.c
new file mode 100644
index 0000000..646cd70
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr117979.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+int a, b;
+void foo (void);
+int __attribute__((returns_twice)) bar (int);
+
+int __attribute__((const))
+baz (int f)
+{
+ if (f)
+ {
+ l:;
+ for (f = 0; f < 6; ++f)
+ if (bar (b))
+ goto l;
+ for (;; a--)
+ ;
+ }
+ foo ();
+ return 0;
+}