public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
@ 2020-08-03 16:43 haoxintu at gmail dot com
2020-08-03 19:43 ` [Bug c++/96437] " mpolacek at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: haoxintu at gmail dot com @ 2020-08-03 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Bug ID: 96437
Summary: [10/11 Regression] ICE in tree check: expected tree
that contains ‘decl common’ structure, have
‘error_mark’ in synthesize_implicit_template_parm, at
cp/parser.c:44246
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE, while GCC-10 and downwards
versions behave well in error-recovery.
Input:
//small.cc
template <()> void A(auto){}
Command:
g++ small.cc
Output:
small.cc:1:11: error: expected identifier before ‘(’ token
1 | template <()> void A(auto){}
| ^
small.cc:1:22: internal compiler error: tree check: expected tree that contains
‘decl common’ structure, have ‘error_mark’ in
synthesize_implicit_template_parm, at cp/parser.c:44246
1 | template <()> void A(auto){}
| ^~~~
0x7c899e tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
../../gcc/tree.c:9861
0x6440d9 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
../../gcc/tree.h:3417
0x6440d9 synthesize_implicit_template_parm
../../gcc/cp/parser.c:44246
0x9c72b0 cp_parser_simple_type_specifier
../../gcc/cp/parser.c:18064
0x9aa52d cp_parser_type_specifier
../../gcc/cp/parser.c:17873
0x9ab50e cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:14436
0x9c90ee cp_parser_parameter_declaration
../../gcc/cp/parser.c:22858
0x9c9a82 cp_parser_parameter_declaration_list
../../gcc/cp/parser.c:22681
0x9c9e81 cp_parser_parameter_declaration_clause
../../gcc/cp/parser.c:22608
0x9b6951 cp_parser_direct_declarator
../../gcc/cp/parser.c:21285
0x9b6951 cp_parser_declarator
../../gcc/cp/parser.c:21149
0x9cbab6 cp_parser_init_declarator
../../gcc/cp/parser.c:20649
0x9d31f4 cp_parser_single_declaration
../../gcc/cp/parser.c:29590
0x9d3356 cp_parser_template_declaration_after_parameters
../../gcc/cp/parser.c:29163
0x9d3b00 cp_parser_explicit_template_declaration
../../gcc/cp/parser.c:29428
0x9d76e1 cp_parser_declaration
../../gcc/cp/parser.c:13459
0x9d7d2b cp_parser_translation_unit
../../gcc/cp/parser.c:4793
0x9d7d2b c_parse_file()
../../gcc/cp/parser.c:44081
0xaf2e9d c_common_parse_file()
../../gcc/c-family/c-opts.c:1188
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.
My gcc version is
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/build/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
--prefix=/home/haoxin/corpus-compilers/gcc-trunk/gcc-master/build/
--enable-languages=c,c++ CC=gcc CXX=g++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200801 (experimental) (GCC)
Thanks,
Haoxin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
@ 2020-08-03 19:43 ` mpolacek at gcc dot gnu.org
2020-08-04 6:00 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-03 19:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-08-03
CC| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
2020-08-03 19:43 ` [Bug c++/96437] " mpolacek at gcc dot gnu.org
@ 2020-08-04 6:00 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-04 6:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.3
Priority|P3 |P4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
2020-08-03 19:43 ` [Bug c++/96437] " mpolacek at gcc dot gnu.org
2020-08-04 6:00 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-03-07 13:04 ` [Bug c++/96437] [10/11/12 " roger at nextmovesoftware dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.3 |10.4
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11/12 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
` (2 preceding siblings ...)
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-03-07 13:04 ` roger at nextmovesoftware dot com
2022-03-08 23:25 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-03-07 13:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |roger at nextmovesoftware dot com
Assignee|unassigned at gcc dot gnu.org |roger at nextmovesoftware dot com
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
Patch proposed.
https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591292.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11/12 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
` (3 preceding siblings ...)
2022-03-07 13:04 ` [Bug c++/96437] [10/11/12 " roger at nextmovesoftware dot com
@ 2022-03-08 23:25 ` cvs-commit at gcc dot gnu.org
2022-03-09 16:02 ` roger at nextmovesoftware dot com
2023-03-23 17:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-08 23:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:3093f8a18e7a9c5a9bba976d58a2f91033e7f35a
commit r12-7550-g3093f8a18e7a9c5a9bba976d58a2f91033e7f35a
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Tue Mar 8 23:23:19 2022 +0000
PR c++/96437: ICE-on-invalid-code error recovery.
This patch fixes PR c++/96437 which is an ICE-on-invalid-code regression
affecting mainline.
2022-03-08 Roger Sayle <roger@nextmovesoftware.com>
gcc/cp/ChangeLog
PR c++/96437
* parser.cc (synthesize_implicit_template_parm): Check that
TREE_VALUE (new_parm) isn't error_mark_node before setting its
DECL_VIRTUAL_P.
gcc/testsuite/ChangeLog
PR c++/96437
* g++.dg/cpp2a/pr96437.C: New test case.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11/12 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
` (4 preceding siblings ...)
2022-03-08 23:25 ` cvs-commit at gcc dot gnu.org
@ 2022-03-09 16:02 ` roger at nextmovesoftware dot com
2023-03-23 17:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-03-09 16:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|10.4 |12.0
--- Comment #5 from Roger Sayle <roger at nextmovesoftware dot com> ---
This should now be fixed on mainline.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/96437] [10/11/12 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
` (5 preceding siblings ...)
2022-03-09 16:02 ` roger at nextmovesoftware dot com
@ 2023-03-23 17:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-23 17:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96437
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hewillk at gmail dot com
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 99659 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-23 17:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 16:43 [Bug c++/96437] New: [10/11 Regression] ICE in tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in synthesize_implicit_template_parm, at cp/parser.c:44246 haoxintu at gmail dot com
2020-08-03 19:43 ` [Bug c++/96437] " mpolacek at gcc dot gnu.org
2020-08-04 6:00 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-03-07 13:04 ` [Bug c++/96437] [10/11/12 " roger at nextmovesoftware dot com
2022-03-08 23:25 ` cvs-commit at gcc dot gnu.org
2022-03-09 16:02 ` roger at nextmovesoftware dot com
2023-03-23 17:45 ` 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).