diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2005-09-26 01:28:50 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-09-26 01:28:50 +0000 |
commit | 3f1dfb4145288595055e9fd06afa8a66fae4d86d (patch) | |
tree | 5cefb37b1e429e55e7dde5f0eb3774ca89ad2077 /gcc | |
parent | 89251091ecd6afe2b425cb992a4caa8736ffc452 (diff) | |
download | gcc-3f1dfb4145288595055e9fd06afa8a66fae4d86d.zip gcc-3f1dfb4145288595055e9fd06afa8a66fae4d86d.tar.gz gcc-3f1dfb4145288595055e9fd06afa8a66fae4d86d.tar.bz2 |
re PR middle-end/23960 (ICE in compare_values in VRP)
gcc/
PR tree-optimization/23960
* fold-const.c (fold_binary): Use op0 and op1 instead of arg0
and arg1 if we are passing them to fold_build2.
gcc/testsuite/
PR tree-optimization/23960
* gcc.c-torture/compile/pr23960.c: New.
From-SVN: r104634
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr23960.c | 12 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d643297..44cb1b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-09-25 Kazu Hirata <kazu@codesourcery.com> + + * fold-const.c (fold_binary): Use op0 and op1 instead of arg0 + and arg1 if we are passing them to fold_build2. + 2005-09-25 Dan Nicolaescu <dann@ics.uci.edu> PR 23828 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4b41adf..0190c32 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9285,7 +9285,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return omit_one_operand (type, integer_one_node, arg0); case GT_EXPR: - return fold_build2 (NE_EXPR, type, arg0, arg1); + return fold_build2 (NE_EXPR, type, op0, op1); default: break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c43597..2749585 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-09-25 Kazu Hirata <kazu@codesourcery.com> + + PR tree-optimization/23960 + * gcc.c-torture/compile/pr23960.c: New. + 2005-09-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/16861 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23960.c b/gcc/testsuite/gcc.c-torture/compile/pr23960.c new file mode 100644 index 0000000..5ca0562 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr23960.c @@ -0,0 +1,12 @@ +/* PR tree-optimization/23960 + fold-const.c used to construct a comparison node with one pointer + operand and one non-pointer operand. */ + +void abort (void) __attribute__ ((noreturn)); + +void +foo (char *d, unsigned long int n) +{ + if (d + n > d) + abort (); +} |