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
+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.
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
--- /dev/null
+/* PR sanitizer/80067 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift" } */
+
+extern signed char a;
+void
+foo ()
+{
+ 0 << ((647 > a) - 1);
+}