From efd7ad5c5eeb7ba12d1458cc9c10a0010eb355b0 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 27 Oct 2010 11:54:35 -0400 Subject: [PATCH] * cvt.c (build_up_reference): Use target_type for the temporary var. From-SVN: r166009 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/cvt.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 35bcd65ede44..d4006573e838 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2010-10-27 Jason Merrill + * cvt.c (build_up_reference): Use target_type for the temporary var. + * except.c (build_throw): Set EXPR_LOCATION. * tree.c (build_cplus_new): Handle CONSTRUCTOR. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 00aa44aaa608..95d0ab9f43fb 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -314,7 +314,7 @@ build_up_reference (tree type, tree arg, int flags, tree decl) here because it needs to live as long as DECL. */ tree targ = arg; - arg = make_temporary_var_for_ref_to_temp (decl, TREE_TYPE (arg)); + arg = make_temporary_var_for_ref_to_temp (decl, target_type); /* Process the initializer for the declaration. */ DECL_INITIAL (arg) = targ; -- 2.43.5