2007-08-22 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2007 08:47:26 +0000 (08:47 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2007 08:47:26 +0000 (08:47 +0000)
PR tree-optimization/33142
* gcc.c-torture/execute/pr33142.c: New testcase.

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

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

index 8b73a02..b25e44d 100644 (file)
@@ -1,5 +1,10 @@
 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
        * g++.dg/torture/pr32563.C: New testcase.
 
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;
+}