aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c
new file mode 100644
index 000000000..a2bc4bda3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+int a = 1, b;
+
+void
+foo (void)
+{
+ signed char c = 0;
+ for (; a; a--)
+ for (; c >= 0; c++);
+ if (!c)
+ b = 1;
+}
+
+int
+main ()
+{
+ foo ();
+ if (b != 0)
+ __builtin_abort ();
+ return 0;
+}