From: Richard Guenther Date: Wed, 22 Aug 2007 08:45:58 +0000 (+0000) Subject: re PR tree-optimization/33142 (wrong code with VRP through ABS_EXPR) X-Git-Tag: releases/gcc-4.2.2~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6f914602ed1ebd2d8de30b103717d65f5d7b4ca;p=thirdparty%2Fgcc.git re PR tree-optimization/33142 (wrong code with VRP through ABS_EXPR) 2007-08-22 Richard Guenther PR tree-optimization/33142 * gcc.c-torture/execute/pr33142.c: New testcase. From-SVN: r127692 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a78dd2fb166..a0b690e70178 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-22 Richard Guenther + + PR tree-optimization/33142 + * gcc.c-torture/execute/pr33142.c: New testcase. + 2007-08-22 Richard Guenther 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 index 000000000000..7bfc5b584dbd --- /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; +}