aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 11cb640..7e2124f 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3850,7 +3850,7 @@ convert_like_real (convs, expr, fn, argnum, inner)
tree ref_type = totype;
/* If necessary, create a temporary. */
- if (NEED_TEMPORARY_P (convs))
+ if (NEED_TEMPORARY_P (convs) || !lvalue_p (expr))
{
tree type = TREE_TYPE (TREE_OPERAND (convs, 0));
expr = build_target_expr_with_type (expr, type);