aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 98e62c6..586a32c 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -425,7 +425,7 @@ build_base_path (enum tree_code code,
interesting to the optimizers anyway. */
&& !has_empty)
{
- expr = cp_build_indirect_ref (expr, RO_NULL, complain);
+ expr = cp_build_fold_indirect_ref (expr);
expr = build_simple_base_path (expr, binfo);
if (rvalue)
expr = move (expr);
@@ -452,7 +452,7 @@ build_base_path (enum tree_code code,
t = TREE_TYPE (TYPE_VFIELD (current_class_type));
t = build_pointer_type (t);
v_offset = fold_convert (t, current_vtt_parm);
- v_offset = cp_build_indirect_ref (v_offset, RO_NULL, complain);
+ v_offset = cp_build_fold_indirect_ref (v_offset);
}
else
{
@@ -465,8 +465,7 @@ build_base_path (enum tree_code code,
if (t == NULL_TREE)
t = expr;
}
- v_offset = build_vfield_ref (cp_build_indirect_ref (t, RO_NULL,
- complain),
+ v_offset = build_vfield_ref (cp_build_fold_indirect_ref (t),
TREE_TYPE (TREE_TYPE (expr)));
}
@@ -477,7 +476,7 @@ build_base_path (enum tree_code code,
v_offset = build1 (NOP_EXPR,
build_pointer_type (ptrdiff_type_node),
v_offset);
- v_offset = cp_build_indirect_ref (v_offset, RO_NULL, complain);
+ v_offset = cp_build_fold_indirect_ref (v_offset);
TREE_CONSTANT (v_offset) = 1;
offset = convert_to_integer (ptrdiff_type_node,
@@ -516,7 +515,7 @@ build_base_path (enum tree_code code,
indout:
if (!want_pointer)
{
- expr = cp_build_indirect_ref (expr, RO_NULL, complain);
+ expr = cp_build_fold_indirect_ref (expr);
if (rvalue)
expr = move (expr);
}
@@ -552,7 +551,7 @@ build_simple_base_path (tree expr, tree binfo)
in the back end. */
temp = unary_complex_lvalue (ADDR_EXPR, expr);
if (temp)
- expr = cp_build_indirect_ref (temp, RO_NULL, tf_warning_or_error);
+ expr = cp_build_fold_indirect_ref (temp);
return expr;
}
@@ -745,8 +744,7 @@ build_vfn_ref (tree instance_ptr, tree idx)
{
tree aref;
- aref = build_vtbl_ref_1 (cp_build_indirect_ref (instance_ptr, RO_NULL,
- tf_warning_or_error),
+ aref = build_vtbl_ref_1 (cp_build_fold_indirect_ref (instance_ptr),
idx);
/* When using function descriptors, the address of the