2017-04-10 Martin Liska <mliska@suse.cz>
PR sanitizer/80350
* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
doing an UBSAN check.
2017-04-10 Martin Liska <mliska@suse.cz>
PR sanitizer/80350
* c-c++-common/ubsan/pr80350.c: New test.
From-SVN: r246799
+2017-04-10 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/80350
+ * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
+ doing an UBSAN check.
+
2017-04-03 Jonathan Wakely <jwakely@redhat.com>
* c-warn.c (do_warn_double_promotion): Fix typo in comment.
/* In case we have a SAVE_EXPR in a conditional context, we need to
make sure it gets evaluated before the condition. */
t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), unshare_expr (op0), t);
+ t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), unshare_expr (op1), t);
enum sanitize_code recover_kind = SANITIZE_SHIFT_EXPONENT;
tree else_t = void_node;
+2017-04-10 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/80350
+ * c-c++-common/ubsan/pr80350.c: New test.
+
2017-04-10 Jakub Jelinek <jakub@redhat.com>
PR target/80324
--- /dev/null
+/* PR target/80310 */
+/* { dg-do run } */
+/* { dg-options "-O0 -fsanitize=shift -fno-sanitize-recover=shift" } */
+
+unsigned int x = 1;
+unsigned int y = 0;
+
+void foo() {
+ y = 1 >> (!x * 1111);
+}
+
+int main () {
+ foo ();
+ if (y != 1)
+ __builtin_abort ();
+ return 0;
+}