[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2024-04-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Andrew Pinski  changed:

   What|Removed |Added

 CC||johelegp at gmail dot com

--- Comment #11 from Andrew Pinski  ---
*** Bug 102931 has been marked as a duplicate of this bug. ***

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-08-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Andrew Pinski  changed:

   What|Removed |Added

 CC||amir.ahmed.ansari at outlook 
dot c
   ||om

--- Comment #10 from Andrew Pinski  ---
*** Bug 106351 has been marked as a duplicate of this bug. ***

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:656c0212909bc91b1025aa12774d981adb531b4c

commit r13-1516-g656c0212909bc91b1025aa12774d981adb531b4c
Author: Jason Merrill 
Date:   Tue Jul 5 17:05:47 2022 -0400

c++: dependent conversion operator lookup [PR106179]

This testcase demonstrates that my assumption that we would only be
interested in a class template lookup if the template-id is followed by ::
was wrong.

PR c++/106179
PR c++/106024

gcc/cp/ChangeLog:

* parser.cc (cp_parser_lookup_name): Remove :: requirement
for using unqualified lookup result.

gcc/testsuite/ChangeLog:

* g++.dg/template/operator16.C: New test.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jason Merrill  ---
Fixed for 11.4/12.2/13.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

--- Comment #7 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:252e9dfee9b1d01e0e44773ad83e0e44f3650945

commit r11-10100-g252e9dfee9b1d01e0e44773ad83e0e44f3650945
Author: Jason Merrill 
Date:   Thu Jun 23 23:14:35 2022 -0400

c++: dependent generic lambda template-id [PR106024]

We were wrongly looking up the generic lambda op() in a dependent scope,
and
then trying to look up its instantiation at substitution time, but lambdas
aren't instantiated, so we crashed.  The fix is to not look into dependent
lambda scopes.

PR c++/106024

gcc/cp/ChangeLog:

* parser.c (cp_parser_lookup_name): Don't look in dependent lambda.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/lambda-generic10.C: New test.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

--- Comment #6 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:e748398b3ef6412ef35b85ef6b0893809aeb49cd

commit r12-8537-ge748398b3ef6412ef35b85ef6b0893809aeb49cd
Author: Jason Merrill 
Date:   Fri Jul 1 11:02:54 2022 -0400

c++: simpler fix for PR106024

Actually, for release branches let's just avoid the lookup for the lambdas
that are the problematic case and only make the bigger change on trunk.

PR c++/106024

gcc/cp/ChangeLog:

* parser.cc (cp_parser_lookup_name): Limit previous change to
lambdas.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

--- Comment #5 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:c17206709f94331e81443e2bdcf135a6ab7428ce

commit r12-8533-gc17206709f94331e81443e2bdcf135a6ab7428ce
Author: Jason Merrill 
Date:   Thu Jun 23 23:14:35 2022 -0400

c++: dependent generic lambda template-id [PR106024]

We were wrongly looking up the generic lambda op() in a dependent scope,
and
then trying to look up its instantiation at substitution time, but lambdas
aren't instantiated, so we crashed.  The fix is to not look into dependent
class scopes.

But this created trouble with wrongly trying to use a template from the
enclosing scope when we aren't actually looking at a
template-argument-list,
in template/lookup18.C, so let's avoid that.

PR c++/106024

gcc/cp/ChangeLog:

* parser.cc (missing_template_diag): Factor out...
(cp_parser_id_expression): ...from here.
(cp_parser_lookup_name): Don't look in dependent object_type.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/lambda-generic10.C: New test.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-07-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:07ac550393d00fcadcee21b44abee6bb30c93949

commit r13-1390-g07ac550393d00fcadcee21b44abee6bb30c93949
Author: Jason Merrill 
Date:   Thu Jun 23 23:14:35 2022 -0400

c++: dependent generic lambda template-id [PR106024]

We were wrongly looking up the generic lambda op() in a dependent scope,
and
then trying to look up its instantiation at substitution time, but lambdas
aren't instantiated, so we crashed.  The fix is to not look into dependent
class scopes.

But this created trouble with wrongly trying to use a template from the
enclosing scope when we aren't actually looking at a
template-argument-list,
in template/lookup18.C, so let's avoid that.

PR c++/106024

gcc/cp/ChangeLog:

* parser.cc (missing_template_diag): Factor out...
(cp_parser_id_expression): ...from here.
(cp_parser_lookup_name): Don't look in dependent object_type.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/lambda-generic10.C: New test.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-06-23 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Testcase with only one lambda:

template  void sink(Ts &&...);
template  void f()
{
  sink ([]  (auto...) { return 1; }
.operator()(args...)...);
}

int main()
{
  f<1,2,3>();
}

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-06-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||10.3.0
 Status|UNCONFIRMED |NEW
Summary|ICE on missing template |[11/12/13 Regression] ICE
   |keyword in template method  |on missing template keyword
   |call in pack expansion  |in template method call in
   ||pack expansion
   Last reconfirmed||2022-06-20
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed, a regression from 10.x.

[Bug c++/106024] [11/12/13 Regression] ICE on missing template keyword in template method call in pack expansion

2022-06-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106024

Andrew Pinski  changed:

   What|Removed |Added

Summary|ICE on missing template |[11/12/13 Regression] ICE
   |keyword in template method  |on missing template keyword
   |call in pack expansion  |in template method call in
   ||pack expansion
   Target Milestone|--- |11.4
  Known to work||10.3.0
  Known to fail||11.1.0