Re: [PATCH] Fix folding of X - X to 0

2014-10-22 Thread Jeff Law
On 10/22/14 06:58, Richard Biener wrote: The following fixes a bug in fold-const.c which happily drops side-effects when simplifying X - X to 0. I ran into this because on match-and-simplify I cannot simplify expressions with TREE_SIDE_EFFECTS and it happens that TYPE_SIZE for VLAs has side-eff

[PATCH] Fix folding of X - X to 0

2014-10-22 Thread Richard Biener
The following fixes a bug in fold-const.c which happily drops side-effects when simplifying X - X to 0. I ran into this because on match-and-simplify I cannot simplify expressions with TREE_SIDE_EFFECTS and it happens that TYPE_SIZE for VLAs has side-effects because it usually contains a SAVE_EXP