diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 15:02:47 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 15:02:47 +0000 |
commit | 8119dd34691ad7a7776991748a6741d344b4fa69 (patch) | |
tree | 39790dd276afc2ee13f2f3be039aa21d4ce70dad /gcc | |
parent | 84d59d71affc804cc369ef9cd283ec2b2bd51077 (diff) | |
download | gcc-8119dd34691ad7a7776991748a6741d344b4fa69.tar.gz |
* call.c (build_over_call): Use argarray[0] for 'this' argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/call.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3b73211afd6..749582ba254 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 bdf97a2c239..4b36ab0fade 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); |