2020-04-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2020-04-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/94423
+ * tree-object-size.c (pass_object_sizes::execute): Don't call
+ replace_uses_by for SSA_NAME_OCCURS_IN_ABNORMAL_PHI lhs, instead
+ call replace_call_with_value.
+
2020-03-31 Marc Glisse <marc.glisse@inria.fr>
Jakub Jelinek <jakub@redhat.com>
* fold-const.c (fold_binary_loc) <case TRUNC_DIV_EXPR>: Use
ANY_INTEGRAL_TYPE_P instead of INTEGRAL_TYPE_P.
-2020-04-07 Jakub Jelinek <jakub@redhat.com>
-
2020-03-30 Jakub Jelinek <jakub@redhat.com>
PR target/93069
2020-04-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2020-04-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/94423
+ * gcc.dg/ubsan/pr94423.c: New test.
+
2020-03-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/94412
--- /dev/null
+/* PR middle-end/94423 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fsanitize=object-size" } */
+
+void foo (void);
+typedef struct { long buf[22]; } jmp_buf[1];
+extern int sigsetjmp (jmp_buf, int) __attribute__ ((__nothrow__));
+jmp_buf buf;
+
+void
+bar (int *c)
+{
+ while (*c)
+ foo ();
+ while (*c)
+ sigsetjmp (buf, 0);
+}
}
/* Propagate into all uses and fold those stmts. */
- replace_uses_by (lhs, result);
+ if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ replace_uses_by (lhs, result);
+ else
+ replace_call_with_value (&i, result);
}
}