aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-10-11 21:42:31 -0400
committerJason Merrill <jason@gcc.gnu.org>2014-10-11 21:42:31 -0400
commitd1522e8f63167d81f6bd77c5d29ffdba2e6fbe86 (patch)
tree52a295c7a10b57d2b3007a653db61008c5031b70 /gcc/cp/call.c
parenta4b9dcad0837d3bc03843df6f96e6cb830550af6 (diff)
downloadgcc-d1522e8f63167d81f6bd77c5d29ffdba2e6fbe86.zip
gcc-d1522e8f63167d81f6bd77c5d29ffdba2e6fbe86.tar.gz
gcc-d1522e8f63167d81f6bd77c5d29ffdba2e6fbe86.tar.bz2
re PR c++/62115 (ICE with invalid default argument)
PR c++/62115 * class.c (build_base_path): Preserve rvalueness. * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*. * rtti.c (build_dynamic_cast_1): Call convert_to_reference later. From-SVN: r216124
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 76d8eab..8a89aad 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -6341,10 +6341,8 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
/* We are going to bind a reference directly to a base-class
subobject of EXPR. */
/* Build an expression for `*((base*) &expr)'. */
- expr = cp_build_addr_expr (expr, complain);
- expr = convert_to_base (expr, build_pointer_type (totype),
+ expr = convert_to_base (expr, totype,
!c_cast_p, /*nonnull=*/true, complain);
- expr = cp_build_indirect_ref (expr, RO_IMPLICIT_CONVERSION, complain);
return expr;
}