public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template
@ 2021-08-12 18:08 reichelt at gcc dot gnu.org
2021-08-13 7:51 ` [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061 marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2021-08-12 18:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101889
Bug ID: 101889
Summary: [11/12 Regression] ICE with template argument
deduction of broken template
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
Target Milestone: ---
The following invalid code snippet triggers an ICE since GCC 11:
==============================
template<int> struct A {};
template<T> struct B
{
enum { E = 0 };
B(A<E>) {}
};
B b = A<0>();
==============================
bug.cc:3:10: error: 'T' has not been declared
3 | template<T> struct B
| ^
bug.cc:9:12: internal compiler error: tree check: expected enumeral_type, have
error_mark in tsubst_copy, at cp/pt.c:16588
9 | B b = A<0>();
| ^
0x85a540 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:8686
0x6e74ea tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3373
0x6e74ea tsubst_copy
../../gcc/gcc/cp/pt.c:16588
0xaf1eb4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:20870
0xafd357 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:19092
0xb12264 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:13355
0xb1b763 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:13559
0xb1be34 tsubst_arg_types
../../gcc/gcc/cp/pt.c:14958
0xb1ed5a tsubst_arg_types
../../gcc/gcc/cp/pt.c:14935
0xb1ed5a build_deduction_guide
../../gcc/gcc/cp/pt.c:28776
0xaec0b6 ctor_deduction_guides_for
../../gcc/gcc/cp/pt.c:29184
0xaec0b6 deduction_guides_for
../../gcc/gcc/cp/pt.c:29257
0xaec576 do_class_deduction
../../gcc/gcc/cp/pt.c:29378
0xaec576 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../../gcc/gcc/cp/pt.c:29535
0x9d9608 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:7856
0xac5174 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:22556
0xaa0773 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:15088
0xacfdb5 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14787
0xad078e cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14808
0xad078e cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4978
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061
2021-08-12 18:08 [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template reichelt at gcc dot gnu.org
@ 2021-08-13 7:51 ` marxin at gcc dot gnu.org
2021-08-16 8:56 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-13 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101889
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-13
Summary|[11/12 Regression] ICE with |[11/12 Regression] ICE with
|template argument deduction |template argument deduction
|of broken template |of broken template since
| |r11-2748-gb871301f09be7061
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-2748-gb871301f09be7061.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061
2021-08-12 18:08 [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template reichelt at gcc dot gnu.org
2021-08-13 7:51 ` [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061 marxin at gcc dot gnu.org
@ 2021-08-16 8:56 ` rguenth at gcc dot gnu.org
2022-04-21 7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug c++/101889] [11/12/13/14 " jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-16 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101889
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |11.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061
2021-08-12 18:08 [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template reichelt at gcc dot gnu.org
2021-08-13 7:51 ` [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061 marxin at gcc dot gnu.org
2021-08-16 8:56 ` rguenth at gcc dot gnu.org
@ 2022-04-21 7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug c++/101889] [11/12/13/14 " jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101889
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/101889] [11/12/13/14 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061
2021-08-12 18:08 [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2022-04-21 7:50 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:05 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101889
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-29 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 18:08 [Bug c++/101889] New: [11/12 Regression] ICE with template argument deduction of broken template reichelt at gcc dot gnu.org
2021-08-13 7:51 ` [Bug c++/101889] [11/12 Regression] ICE with template argument deduction of broken template since r11-2748-gb871301f09be7061 marxin at gcc dot gnu.org
2021-08-16 8:56 ` rguenth at gcc dot gnu.org
2022-04-21 7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug c++/101889] [11/12/13/14 " jakub 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).