diff options
Diffstat (limited to 'gcc/cp/cp-ubsan.c')
-rw-r--r-- | gcc/cp/cp-ubsan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/cp-ubsan.c b/gcc/cp/cp-ubsan.c index cd2b60ad488..c87c0303f57 100644 --- a/gcc/cp/cp-ubsan.c +++ b/gcc/cp/cp-ubsan.c @@ -205,7 +205,7 @@ cp_ubsan_check_member_access_r (tree *stmt_p, int *walk_subtrees, void *data) if (TREE_CODE (t) == ADDR_EXPR) { *walk_subtrees = 0; - t = TREE_OPERAND (stmt, 0); + t = TREE_OPERAND (t, 0); cp_walk_tree (&t, cp_ubsan_check_member_access_r, data, ucmd->pset); } break; @@ -298,8 +298,7 @@ cp_ubsan_dfs_initialize_vtbl_ptrs (tree binfo, void *data) /* Compute the location of the vtpr. */ tree vtbl_ptr - = build_vfield_ref (cp_build_indirect_ref (base_ptr, RO_NULL, - tf_warning_or_error), + = build_vfield_ref (cp_build_fold_indirect_ref (base_ptr), TREE_TYPE (binfo)); gcc_assert (vtbl_ptr != error_mark_node); |