Commit 72785f26 by Marek Polacek Committed by Marek Polacek

re PR sanitizer/80067 (ICE in fold_comparison with -fsanitize=undefined)

	PR sanitizer/80067
	* fold-const.c (fold_comparison): Use protected_set_expr_location
	instead of SET_EXPR_LOCATION.

	* c-c++-common/ubsan/shift-10.c: New test.

From-SVN: r246521
parent b1bd9158
2017-03-28 Marek Polacek <polacek@redhat.com>
PR sanitizer/80067
* fold-const.c (fold_comparison): Use protected_set_expr_location
instead of SET_EXPR_LOCATION.
2017-03-28 Markus Trippelsdorf <markus@trippelsdorf.de>
* tree.c (add_expr): Avoid name lookup warning.
......
......@@ -8704,7 +8704,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
if (save_p)
{
tem = save_expr (build2 (code, type, cval1, cval2));
SET_EXPR_LOCATION (tem, loc);
protected_set_expr_location (tem, loc);
return tem;
}
return fold_build2_loc (loc, code, type, cval1, cval2);
......
2017-03-28 Marek Polacek <polacek@redhat.com>
PR sanitizer/80067
* c-c++-common/ubsan/shift-10.c: New test.
2017-03-27 Jeff Law <law@redhat.com>
PR tree-optimization/80216
......
/* PR sanitizer/80067 */
/* { dg-do compile } */
/* { dg-options "-fsanitize=shift" } */
extern signed char a;
void
foo ()
{
0 << ((647 > a) - 1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment