[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-10-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.3

--- Comment #7 from Jason Merrill  ---
Fixed for 7.3/8.

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-09-18 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Mon Sep 18 18:37:10 2017
New Revision: 252945

URL: https://gcc.gnu.org/viewcvs?rev=252945=gcc=rev
Log:
PR c++/80767 - unnecessary instantiation of generic lambda

PR c++/82030 - ICE inheriting from multiple lambdas
* call.c (convert_like_real): Call build_user_type_conversion_1 if
cand is null.
(add_conv_candidate): Build a ck_user conversion with no candidate.
(compare_ics): Handle null candidate.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv12.C
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/call.c

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

--- Comment #5 from Aldy Hernandez  ---
Author: aldyh
Date: Wed Sep 13 17:38:39 2017
New Revision: 252617

URL: https://gcc.gnu.org/viewcvs?rev=252617=gcc=rev
Log:
PR c++/80767 - unnecessary instantiation of generic lambda

* call.c (convert_like_real): Call build_user_type_conversion_1 if
cand is null.
(add_conv_candidate): Build a ck_user conversion with no candidate.

Added:
branches/range-gen2/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C
Modified:
branches/range-gen2/gcc/cp/ChangeLog
branches/range-gen2/gcc/cp/call.c

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-08-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Wed Aug 30 22:19:33 2017
New Revision: 251549

URL: https://gcc.gnu.org/viewcvs?rev=251549=gcc=rev
Log:
PR c++/82030 - ICE inheriting from multiple lambdas

PR c++/80767
* call.c (compare_ics): Handle null candidate.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-08-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Tue Aug 29 19:40:55 2017
New Revision: 251427

URL: https://gcc.gnu.org/viewcvs?rev=251427=gcc=rev
Log:
PR c++/80767 - unnecessary instantiation of generic lambda

* call.c (convert_like_real): Call build_user_type_conversion_1 if
cand is null.
(add_conv_candidate): Build a ck_user conversion with no candidate.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-08-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-08-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-08-28
 CC||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jason Merrill  ---
(In reply to TC from comment #1)
> This is another manifestation of bug 71117.

It looks similar, but is actually a different bug.  In this case, we are
building a surrogate call function for the conversion operator of the
non-generic lambda (which CallFoo doesn't have).

The bug is that in generating the candidate for the surrogate call function, we
consider how overloader would convert to that target type, which means we
consider the conversion template of the generic lambda.

The standard seems to say that we shouldn't try to figure out that conversion
unless the surrogate call function is actually chosen by overload resolution.

[Bug c++/80767] Eager instantiation of generic lambda body when not required

2017-05-15 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80767

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #1 from TC  ---
This is another manifestation of bug 71117.