2015-06-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2015-05-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65984
+ * ubsan.c: Include tree-cfg.h.
+ (instrument_bool_enum_load): Use stmt_ends_bb_p instead of
+ stmt_could_throw_p test, rename can_throw variable to ends_bb.
+
2015-04-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/65680
2015-06-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2015-05-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65984
+ * c-c++-common/ubsan/pr65984.c: New test.
+
2015-04-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/65680
#include "gimplify-me.h"
#include "intl.h"
#include "tree-eh.h"
+#include "tree-cfg.h"
/* Map from a tree to a VAR_DECL tree. */
|| TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
return;
- bool can_throw = stmt_could_throw_p (stmt);
+ bool ends_bb = stmt_ends_bb_p (stmt);
location_t loc = gimple_location (stmt);
tree lhs = gimple_assign_lhs (stmt);
tree ptype = build_pointer_type (TREE_TYPE (rhs));
tree mem = build2 (MEM_REF, utype, gimple_assign_lhs (g),
build_int_cst (atype, 0));
tree urhs = make_ssa_name (utype, NULL);
- if (can_throw)
+ if (ends_bb)
{
gimple_assign_set_lhs (stmt, urhs);
g = gimple_build_assign_with_ops (NOP_EXPR, lhs, urhs, NULL_TREE);
gimple_set_location (g, loc);
gsi_insert_after (gsi, g, GSI_NEW_STMT);
- if (!can_throw)
+ if (!ends_bb)
{
gimple_assign_set_rhs_with_ops (&gsi2, NOP_EXPR, urhs, NULL_TREE);
update_stmt (stmt);