2006-06-16 Richard Guenther <rguenther@suse.de>
PR middle-end/27116 * fold-const.c (negate_expr_p): Do not introduce undefined overflow in negating INTEGER_CSTs. (fold_negate_expr): Rename from negate_expr. Revert last change for folding BIT_NOT_EXPR. Change semantics to return NULL_TREE for non-simplified negations. Do not strip type conversions and unify type handling. (negate_expr): New function, wrap around fold_negate_expr but ensure building a tree always. Strip type conversions here, fold to result type. (fold_unary): Use fold_negate_expr for folding NEGATE_EXPR. * gcc.dg/pr15785-1.c: Revert last change. * gcc.dg/torture/pr27116-2.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114723 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/ChangeLog 14 additions, 0 deletionsgcc/ChangeLog
- gcc/fold-const.c 54 additions, 50 deletionsgcc/fold-const.c
- gcc/testsuite/ChangeLog 6 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/pr15785-1.c 6 additions, 0 deletionsgcc/testsuite/gcc.dg/pr15785-1.c
- gcc/testsuite/gcc.dg/torture/pr27116-2.c 13 additions, 0 deletionsgcc/testsuite/gcc.dg/torture/pr27116-2.c
Loading
Please register or sign in to comment