diff options
author | Jason Merrill <jason@redhat.com> | 2010-10-27 11:54:35 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-10-27 11:54:35 -0400 |
commit | efd7ad5c5eeb7ba12d1458cc9c10a0010eb355b0 (patch) | |
tree | 9eaebf4abf0ab77eeabe07ae752fe8a35b80f2ef /gcc/cp | |
parent | 73808ca6a4b67e9e8dea94e36635122b445262b2 (diff) | |
download | gcc-efd7ad5c5eeb7ba12d1458cc9c10a0010eb355b0.zip gcc-efd7ad5c5eeb7ba12d1458cc9c10a0010eb355b0.tar.gz gcc-efd7ad5c5eeb7ba12d1458cc9c10a0010eb355b0.tar.bz2 |
* cvt.c (build_up_reference): Use target_type for the temporary var.
From-SVN: r166009
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 35bcd65..d400657 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 00aa44a..95d0ab9 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; |