public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95935] New: ICE : Segmentation fault
@ 2020-06-27 5:45 haoxintu at gmail dot com
2020-07-07 23:45 ` [Bug c++/95935] ICE : Segmentation fault crash_signal from toplev.c:328 mpolacek at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: haoxintu at gmail dot com @ 2020-06-27 5:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95935
Bug ID: 95935
Summary: ICE : Segmentation fault
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: 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: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE with Segmentation
fault.
$cat bug.cc
enum struct a;
template <class = enum struct a { b;
template <> enum struct a {
$g++ bug.cc
bug.cc:2:36: error: expected ‘}’ before ‘;’ token
2 | template <class = enum struct a { b;
| ~ ^
bug.cc:2:36: error: expected ‘>’ before ‘;’ token
bug.cc:2:36: error: expected unqualified-id before ‘;’ token
bug.cc:4: error: expected identifier at end of input
bug.cc:4: error: expected ‘}’ at end of input
bug.cc:3:27: note: to match this ‘{’
3 | template <> enum struct a {
| ^
bug.cc:2:35: internal compiler error: Segmentation fault
2 | template <class = enum struct a { b;
| ^
0xfe451f crash_signal
../../gcc/toplev.c:328
0x1295faa copy_node(tree_node*)
../../gcc/tree.c:1186
0x9121bc finish_enum_value_list(tree_node*)
../../gcc/cp/decl.c:15712
0x9a20f4 cp_parser_enum_specifier
../../gcc/cp/parser.c:19443
0x9a20f4 cp_parser_type_specifier
../../gcc/cp/parser.c:17734
0x9a2a02 cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:14410
0x9c8f35 cp_parser_single_declaration
../../gcc/cp/parser.c:29459
0x9ca0f0 cp_parser_explicit_specialization
../../gcc/cp/parser.c:17654
0x9ccac9 cp_parser_declaration
../../gcc/cp/parser.c:13430
0x9cd06a cp_parser_translation_unit
../../gcc/cp/parser.c:4761
0x9cd06a c_parse_file()
../../gcc/cp/parser.c:44043
0xae4dbb c_common_parse_file()
../../gcc/c-family/c-opts.c:1190
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.
$g++ --version
g++ (GCC) 11.0.0 20200626 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-08 12:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-27 5:45 [Bug c++/95935] New: ICE : Segmentation fault haoxintu at gmail dot com
2020-07-07 23:45 ` [Bug c++/95935] ICE : Segmentation fault crash_signal from toplev.c:328 mpolacek at gcc dot gnu.org
2020-07-07 23:53 ` mpolacek at gcc dot gnu.org
2020-07-08 12:08 ` mpolacek 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).