Re: [PATCH] Fix ICE in fold_comparison with -fsanitize=shift (PR sanitizer/80067)

2017-03-28 Thread Richard Biener
On Mon, Mar 27, 2017 at 7:30 PM, Marek Polacek wrote: > The code in fold_comparison calls save_expr on an expression and then tries to > set a location of the expression. But since save_expr calls fold, it can > produce an integer constant, so we must be more careful when

[PATCH] Fix ICE in fold_comparison with -fsanitize=shift (PR sanitizer/80067)

2017-03-27 Thread Marek Polacek
The code in fold_comparison calls save_expr on an expression and then tries to set a location of the expression. But since save_expr calls fold, it can produce an integer constant, so we must be more careful when setting its location. In this case we had (int) a > 646 where 'a' is signed