From: Richard Guenther Date: Wed, 22 Aug 2007 08:47:26 +0000 (+0000) Subject: re PR tree-optimization/33142 (wrong code with VRP through ABS_EXPR) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8dd107d4cc277006b70a3439d94b6505c31b262;p=gcc.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: r127693 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8b73a028977..b25e44d5ba4 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 00000000000..7bfc5b584db --- /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; +}