PR middle-end/32628
commitc6feb9f122942ce917541aae8fead534ce6b9929
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Apr 2010 15:47:38 +0000 (13 15:47 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Apr 2010 15:47:38 +0000 (13 15:47 +0000)
tree04470a1e966906835dc05e1a512d55c9904ce185
parentd4c7816a34cdbf396efa1009310b2fc2a05631bc
PR middle-end/32628
* c-common.c (pointer_int_sum): Disregard overflow that occured only
because of sign-extension change when converting to sizetype here...
* fold-const.c (fold_convert_const_int_from_int): ...and not here.

* fold-const.c (fold_binary_op_with_conditional_arg): Do not restrict
the folding to constants.  Remove redundant final conversion.
(fold_binary) <associate>: Do not associate if the re-association of
constants alone overflows.
(fold_binary) <FLOOR_MOD_EXPR>: Move transformation into BIT_AND_EXPR
to the end of the list.
(multiple_of_p) <COND_EXPR>: New case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158274 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/fold-const.c