* cvt.c (build_up_reference): Use target_type for the temporary var.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Oct 2010 15:54:35 +0000 (15:54 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Oct 2010 15:54:35 +0000 (15:54 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cvt.c

index 35bcd65..d400657 100644 (file)
@@ -1,5 +1,7 @@
 2010-10-27  Jason Merrill  <jason@redhat.com>
 
+       * 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.
index 00aa44a..95d0ab9 100644 (file)
@@ -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;