[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2021-05-01 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

Patrick Palka  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 CC||ppalka at gcc dot gnu.org

--- Comment #7 from Patrick Palka  ---
Fixed for GCC 11.2 and 12.

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2021-05-01 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565
Bug 89565 depends on bug 93383, which changed state.

Bug 93383 Summary: ICE on accessing field of a structure which is non-type 
template parameter, -std=c++2a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93383

   What|Removed |Added

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

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2021-04-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

--- Comment #6 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Patrick Palka
:

https://gcc.gnu.org/g:9532344edcf77c7c7b0fa5da31c1b9dd2850288e

commit r11-8309-g9532344edcf77c7c7b0fa5da31c1b9dd2850288e
Author: Patrick Palka 
Date:   Sat Apr 24 00:14:29 2021 -0400

c++: do_class_deduction and dependent init [PR93383]

Here we're crashing during CTAD with a dependent initializer (performed
from convert_template_argument) because one of the initializer's
elements has an empty TREE_TYPE, which ends up making resolve_args
unhappy.

Besides the case where we're initializing one template placeholder
from another, which is already specifically handled earlier in
do_class_deduction, it seems we can't in general correctly resolve a
template placeholder using a dependent initializer, so this patch makes
the function just punt until instantiation time instead.

gcc/cp/ChangeLog:

PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* pt.c (do_class_deduction): Punt if the initializer is
type-dependent.

gcc/testsuite/ChangeLog:

PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
* g++.dg/cpp2a/nontype-class45.C: New test.
* g++.dg/cpp2a/nontype-class46.C: New test.
* g++.dg/cpp2a/nontype-class47.C: New test.
* g++.dg/cpp2a/nontype-class48.C: New test.

(cherry picked from commit bcd77b7b9f35bd5b559ed593c3b3e346c1e6f364)

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2021-04-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Patrick Palka :

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

commit r12-100-gbcd77b7b9f35bd5b559ed593c3b3e346c1e6f364
Author: Patrick Palka 
Date:   Sat Apr 24 00:14:29 2021 -0400

c++: do_class_deduction and dependent init [PR93383]

Here we're crashing during CTAD with a dependent initializer (performed
from convert_template_argument) because one of the initializer's
elements has an empty TREE_TYPE, which ends up making resolve_args
unhappy.

Besides the case where we're initializing one template placeholder
from another, which is already specifically handled earlier in
do_class_deduction, it seems we can't in general correctly resolve a
template placeholder using a dependent initializer, so this patch makes
the function just punt until instantiation time instead.

gcc/cp/ChangeLog:

PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* pt.c (do_class_deduction): Punt if the initializer is
type-dependent.

gcc/testsuite/ChangeLog:

PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
* g++.dg/cpp2a/nontype-class45.C: New test.
* g++.dg/cpp2a/nontype-class46.C: New test.
* g++.dg/cpp2a/nontype-class47.C: New test.
* g++.dg/cpp2a/nontype-class48.C: New test.

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2021-03-22 Thread falemagn at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

--- Comment #4 from Fabio Alemagna  ---
Just encountered this bug myself, with trunk gcc (11.0.1 20210321
(experimental)).

See godbolt: https://godbolt.org/z/TxW137Whh

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2020-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Marek Polacek :

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

commit r11-4890-ga210d404d08e363af4b2e2a60986c3cb08f8ebc5
Author: Marek Polacek 
Date:   Tue Nov 10 14:57:19 2020 -0500

c++: Add 5 unfixed tests.

A couple of dg-ice tests.

gcc/testsuite/ChangeLog:

PR c++/52830
PR c++/88982
PR c++/90799
PR c++/87765
PR c++/89565
* g++.dg/cpp0x/constexpr-52830.C: New test.
* g++.dg/cpp0x/vt-88982.C: New test.
* g++.dg/cpp1z/class-deduction76.C: New test.
* g++.dg/cpp1z/constexpr-lambda26.C: New test.
* g++.dg/cpp2a/nontype-class39.C: New test.

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2020-01-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

Marek Polacek  changed:

   What|Removed |Added

 CC||boris.rura at gmail dot com

--- Comment #2 from Marek Polacek  ---
*** Bug 90335 has been marked as a duplicate of this bug. ***

[Bug c++/89565] [C++2a] ICE on template instantiating user defined non-type template from template value member

2019-03-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89565

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-04
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
An ICE in unify_one_argument started with r243867.  Changed into an ICE in
resole_args in r245796.