public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96605] New: ICE on C++20 code
@ 2020-08-13 20:35 dimitri.gorokhovik at free dot fr
2020-08-14 7:29 ` [Bug c++/96605] ICE in tsubst, at cp/pt.c:14929 " marxin at gcc dot gnu.org
2022-01-19 0:39 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dimitri.gorokhovik at free dot fr @ 2020-08-13 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96605
Bug ID: 96605
Summary: ICE on C++20 code
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dimitri.gorokhovik at free dot fr
Target Milestone: ---
The following code:
#include <tuple>
template <auto T> concept Expression_Term = true;
template <auto T> concept Array_Term = true;
template <Expression_Term ... > struct dictionary {};
template <Array_Term ... > struct tuple {};
template <auto Dict, auto Lhs, auto Rhs> struct flow_graph {};
template <template <Expression_Term, Array_Term, Array_Term> class node,
Expression_Term ... exps, Array_Term ... lhs, Array_Term ... rhs>
constexpr auto apply (flow_graph <dictionary <exps...> {},
tuple <lhs...> {},
tuple <rhs...> {}>)
{
return std::tuple <node <exps, lhs, rhs>...> {};
};
produces this ICE: [version: g++ (GCC) 11.0.0 20200812 (experimental)]
g++ -o test-1 -std=c++2a -fconcepts-ts test-1.i
test-1.i: In function ‘constexpr auto apply(flow_graph<dictionary<exps ...>{},
tuple<lhs ...>{}, tuple<rhs ...>{}>)’:
test-1.i:11511:42: internal compiler error: in tsubst, at cp/pt.c:15388
11511 | return std::tuple <node <exps, lhs, rhs>...> {};
| ^
0x688eab tsubst(tree_node*, tree_node*, int, tree_node*)
../../src/gcc/cp/pt.c:15388
0xa101d6 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../../src/gcc/cp/pt.c:29159
0xa39d02 convert_template_argument
../../src/gcc/cp/pt.c:8428
0xa3ca43 coerce_template_parms
../../src/gcc/cp/pt.c:8932
0xa285a8 lookup_template_class_1
../../src/gcc/cp/pt.c:9710
0xa2a0fc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../src/gcc/cp/pt.c:10140
0xa641ab finish_template_type(tree_node*, tree_node*, int)
../../src/gcc/cp/semantics.c:3446
0x9ddb51 cp_parser_template_id
../../src/gcc/cp/parser.c:16833
0x9ddd43 cp_parser_class_name
../../src/gcc/cp/parser.c:23811
0x9d9c65 cp_parser_qualifying_entity
../../src/gcc/cp/parser.c:6844
0x9d9c65 cp_parser_nested_name_specifier_opt
../../src/gcc/cp/parser.c:6526
0x9e2815 cp_parser_simple_type_specifier
../../src/gcc/cp/parser.c:18229
0x9c642d cp_parser_type_specifier
../../src/gcc/cp/parser.c:17887
0x9dc143 cp_parser_type_specifier_seq
../../src/gcc/cp/parser.c:22493
0x9d4e54 cp_parser_type_id_1
../../src/gcc/cp/parser.c:22310
0x9d78e3 cp_parser_template_type_arg
../../src/gcc/cp/parser.c:22401
0x9dc2bf cp_parser_template_argument
../../src/gcc/cp/parser.c:17283
0x9dc2bf cp_parser_template_argument_list
../../src/gcc/cp/parser.c:17194
0x9dc2bf cp_parser_enclosed_template_argument_list
../../src/gcc/cp/parser.c:29886
0x9dd620 cp_parser_template_id
../../src/gcc/cp/parser.c:16766
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/96605] ICE in tsubst, at cp/pt.c:14929 on C++20 code
2020-08-13 20:35 [Bug c++/96605] New: ICE on C++20 code dimitri.gorokhovik at free dot fr
@ 2020-08-14 7:29 ` marxin at gcc dot gnu.org
2022-01-19 0:39 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-08-14 7:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96605
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on C++20 code |ICE in tsubst, at
| |cp/pt.c:14929 on C++20 code
Ever confirmed|0 |1
Last reconfirmed| |2020-08-14
Status|UNCONFIRMED |NEW
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with the revision that added -fconcepts-ts
r10-3735-gcb57504a55015891.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/96605] ICE in tsubst, at cp/pt.c:14929 on C++20 code
2020-08-13 20:35 [Bug c++/96605] New: ICE on C++20 code dimitri.gorokhovik at free dot fr
2020-08-14 7:29 ` [Bug c++/96605] ICE in tsubst, at cp/pt.c:14929 " marxin at gcc dot gnu.org
@ 2022-01-19 0:39 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-19 0:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96605
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this was fixed in GCC 11.1.0:
I get:
<source>:7:11: error: 'Expression_Term' does not constrain a type
7 | template <Expression_Term ... > struct dictionary {};
| ^~~~~~~~~~~~~~~
And I think the code is invalid too.
If I change the first two concepts to:
template <typename T> concept Expression_Term = true;
template <typename T> concept Array_Term = true;
We accept the code as expected.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-19 0:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 20:35 [Bug c++/96605] New: ICE on C++20 code dimitri.gorokhovik at free dot fr
2020-08-14 7:29 ` [Bug c++/96605] ICE in tsubst, at cp/pt.c:14929 " marxin at gcc dot gnu.org
2022-01-19 0:39 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).