]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/33142 (wrong code with VRP through ABS_EXPR)
authorRichard Guenther <rguenther@suse.de>
Wed, 22 Aug 2007 08:47:26 +0000 (08:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 22 Aug 2007 08:47:26 +0000 (08:47 +0000)
2007-08-22  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/33142
* gcc.c-torture/execute/pr33142.c: New testcase.

From-SVN: r127693

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr33142.c [new file with mode: 0644]

index 8b73a028977c07e8c067f8457efd85f0f3bd240b..b25e44d5ba4ff2e038b834ebd452a8e10297ac12 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-22  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/33142
+       * gcc.c-torture/execute/pr33142.c: New testcase.
+
 2007-08-22  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/32563
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr33142.c b/gcc/testsuite/gcc.c-torture/execute/pr33142.c
new file mode 100644 (file)
index 0000000..7bfc5b5
--- /dev/null
@@ -0,0 +1,16 @@
+int abs(int j);
+extern void abort(void);
+
+__attribute__((noinline)) int lisp_atan2(long dy, long dx) {
+    if (dx <= 0)
+        if (dy > 0)
+            return abs(dx) <= abs(dy);
+    return 0;
+}
+
+int main() {   
+    volatile long dy = 63, dx = -77;
+    if (lisp_atan2(dy, dx))
+        abort();
+    return 0;
+}
This page took 0.114324 seconds and 5 git commands to generate.