aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-08-22 08:47:26 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-08-22 08:47:26 +0000
commitf8dd107d4cc277006b70a3439d94b6505c31b262 (patch)
treec9c93523252e2cab2aae25e4a4a44c927f38500b /gcc
parentb26eca6af7449de587e1f7073ab2103998fc21cc (diff)
downloadgcc-f8dd107d4cc277006b70a3439d94b6505c31b262.zip
gcc-f8dd107d4cc277006b70a3439d94b6505c31b262.tar.gz
gcc-f8dd107d4cc277006b70a3439d94b6505c31b262.tar.bz2
re PR tree-optimization/33142 (wrong code with VRP through ABS_EXPR)
2007-08-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/33142 * gcc.c-torture/execute/pr33142.c: New testcase. From-SVN: r127693
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr33142.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8b73a02..b25e44d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..7bfc5b5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr33142.c
@@ -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;
+}