diff options
author | Jason Merrill <jason@redhat.com> | 2015-03-09 15:59:54 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-03-09 15:59:54 -0400 |
commit | a2f259ef04b104e6ee9770b2d4c11c93195654ad (patch) | |
tree | 9419c41d55067980917ddff188920097354a69bc /gcc/cp | |
parent | 01177669b2eabfb1ddb3290c35bc110980b44d62 (diff) | |
download | gcc-a2f259ef04b104e6ee9770b2d4c11c93195654ad.zip gcc-a2f259ef04b104e6ee9770b2d4c11c93195654ad.tar.gz gcc-a2f259ef04b104e6ee9770b2d4c11c93195654ad.tar.bz2 |
re PR c++/65339 (C++ ICE with lambda and no capture list)
PR c++/65339
* call.c: Don't call maybe_resolve_dummy when calling a constructor.
From-SVN: r221285
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cd2d076..67aa184 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-09 Jason Merrill <jason@redhat.com> + + PR c++/65339 + * call.c: Don't call maybe_resolve_dummy when calling a constructor. + 2015-03-09 Jakub Jelinek <jakub@redhat.com> PR c/65120 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 2b15185..fdd8436 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8020,7 +8020,11 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args, that would be captured if the call turns out to be to a non-static member function. Do not actually capture it at this point. */ - first_mem_arg = maybe_resolve_dummy (instance, false); + if (DECL_CONSTRUCTOR_P (fn)) + /* Constructors don't use the enclosing 'this'. */ + first_mem_arg = instance; + else + first_mem_arg = maybe_resolve_dummy (instance, false); /* Get the high-water mark for the CONVERSION_OBSTACK. */ p = conversion_obstack_alloc (0); |