OSDN Git Service

2011-12-06 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Dec 2011 13:45:19 +0000 (13:45 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Dec 2011 13:45:19 +0000 (13:45 +0000)
PR tree-optimization/49997
* gcc.dg/torture/pr49997.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182049 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr49997.c [new file with mode: 0644]

index 5668927..f4c61d3 100644 (file)
@@ -1,5 +1,10 @@
 2011-12-06  Richard Guenther  <rguenther@suse.de>
 
+       PR tree-optimization/49997
+       * gcc.dg/torture/pr49997.c: New testcase.
+
+2011-12-06  Richard Guenther  <rguenther@suse.de>
+
        PR middle-end/51436
        * g++.dg/torture/pr51436.C: New testcase.
 
diff --git a/gcc/testsuite/gcc.dg/torture/pr49997.c b/gcc/testsuite/gcc.dg/torture/pr49997.c
new file mode 100644 (file)
index 0000000..4ccc604
--- /dev/null
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-finline-functions -fnon-call-exceptions" } */
+
+extern int g_78, g_223;
+static int MOD(int si1, int si2) {
+    return (!si2 || (!si1 && si2)) ? si1 : (si1 % 3);
+}
+void func_65(int p_66) {
+    g_78 = MOD(p_66, 3);
+}
+void func_54(int si1) {
+    func_65(0);
+    func_65(1);
+    func_65(2);
+    while (g_223) {
+       MOD(si1, 3);
+       func_65(3);
+       func_65(4);
+       func_65(5);
+       func_65(6);
+       func_65(7);
+       func_65(8);
+    }
+}
+