summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-21 10:32:43 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-21 10:32:43 +0000
commitf7a31d777cd586da603c18be6b3dc830ddb4454c (patch)
treeaf3401b2c1f3a7bda0d5e39900754b6b79979908 /gcc
parent4a0626ffa5e2cbb8cd648a9364d987264f5a2902 (diff)
downloadppe42-gcc-f7a31d777cd586da603c18be6b3dc830ddb4454c.tar.gz
ppe42-gcc-f7a31d777cd586da603c18be6b3dc830ddb4454c.zip
2012-12-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/52996 * gcc.dg/torture/pr52996.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194659 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52996.c33
2 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b89fa028ac6..a51f09e2aad 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/52996
+ * gcc.dg/torture/pr52996.c: New testcase.
+
2012-12-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/55750
diff --git a/gcc/testsuite/gcc.dg/torture/pr52996.c b/gcc/testsuite/gcc.dg/torture/pr52996.c
new file mode 100644
index 00000000000..200bc36b2aa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52996.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-funswitch-loops" } */
+
+int a, b, c, d, e, f;
+void
+fn1 ()
+{
+ int g, h;
+lbl_173:
+ if (a)
+ c++;
+lbl_158:
+ e = 0;
+ h = 0;
+ for (; h > -8; h--)
+ {
+ g = 0;
+ for (; g <= 0; g += 1)
+ {
+ d = 1;
+ for (; d >= 0; d -= 1)
+ a = 1;
+ if (b)
+ break;
+ if (f)
+ return;
+ if (h)
+ goto lbl_158;
+ }
+ }
+ goto lbl_173;
+}
+
OpenPOWER on IntegriCloud