aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-26 11:02:47 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-26 11:02:47 -0400
commit2dfa30b4c89ba3533ba68b3a9767b062716dc879 (patch)
tree39790dd276afc2ee13f2f3be039aa21d4ce70dad /gcc
parentd70a5179425c0874bac72143dd859f4addc26756 (diff)
downloadgcc-2dfa30b4c89ba3533ba68b3a9767b062716dc879.zip
gcc-2dfa30b4c89ba3533ba68b3a9767b062716dc879.tar.gz
gcc-2dfa30b4c89ba3533ba68b3a9767b062716dc879.tar.bz2
* call.c (build_over_call): Use argarray[0] for 'this' argument.
From-SVN: r165968
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/call.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3b73211..749582b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2010-10-26 Jason Merrill <jason@redhat.com>
+ * call.c (build_over_call): Use argarray[0] for 'this' argument.
+
* decl.c (finish_function): Don't look at function_depth.
2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index bdf97a2..4b36ab0 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5964,9 +5964,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
INIT_EXPR to collapse the temp into our target. Otherwise, if the
ctor is trivial, do a bitwise copy with a simple TARGET_EXPR for a
temp or an INIT_EXPR otherwise. */
- fa = (cand->first_arg != NULL_TREE
- ? cand->first_arg
- : VEC_index (tree, args, 0));
+ fa = argarray[0];
if (integer_zerop (fa))
{
if (TREE_CODE (arg) == TARGET_EXPR)
@@ -6041,6 +6039,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
return val;
}
+ /* FIXME handle trivial default constructor and destructor, too. */
if (!already_used)
mark_used (fn);