[Bug c++/76481] New: ICE on (invalid) redeclaration of extern variable as constexpr variable
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Aug 13 23:28:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=76481
Bug ID: 76481
Summary: ICE on (invalid) redeclaration of extern variable as
constexpr variable
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
Test case:
extern int x;
constexpr int x = 5;
Error:
Segmentation fault
constexpr int x = 5;
^
0xd821af crash_signal
/home/patrick/code/gcc/gcc/toplev.c:335
0x74455b dump_simple_decl
/home/patrick/code/gcc/gcc/cp/error.c:965
0x744af5 dump_decl
/home/patrick/code/gcc/gcc/cp/error.c:1071
0x7502d2 decl_to_string
/home/patrick/code/gcc/gcc/cp/error.c:2979
0x7502d2 cp_printer
/home/patrick/code/gcc/gcc/cp/error.c:3559
0x150bf68 pp_format(pretty_printer*, text_info*)
/home/patrick/code/gcc/gcc/pretty-print.c:643
0x15068a0 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
/home/patrick/code/gcc/gcc/diagnostic.c:934
0x1506ba3 diagnostic_impl
/home/patrick/code/gcc/gcc/diagnostic.c:1054
0x1507474 error(char const*, ...)
/home/patrick/code/gcc/gcc/diagnostic.c:1254
0x678655 duplicate_decls(tree_node*, tree_node*, bool)
/home/patrick/code/gcc/gcc/cp/decl.c:1686
0x85116c pushdecl_maybe_friend_1
/home/patrick/code/gcc/gcc/cp/name-lookup.c:808
0x85116c pushdecl_maybe_friend(tree_node*, bool)
/home/patrick/code/gcc/gcc/cp/name-lookup.c:1301
0x692483 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
/home/patrick/code/gcc/gcc/cp/decl.c:5045
0x788881 cp_parser_init_declarator
/home/patrick/code/gcc/gcc/cp/parser.c:18697
0x7894d7 cp_parser_simple_declaration
/home/patrick/code/gcc/gcc/cp/parser.c:12485
0x7897fa cp_parser_block_declaration
/home/patrick/code/gcc/gcc/cp/parser.c:12361
0x791e5e cp_parser_declaration
/home/patrick/code/gcc/gcc/cp/parser.c:12258
0x790846 cp_parser_declaration_seq_opt
/home/patrick/code/gcc/gcc/cp/parser.c:12137
0x790b78 cp_parser_translation_unit
/home/patrick/code/gcc/gcc/cp/parser.c:4354
0x790b78 c_parse_file()
/home/patrick/code/gcc/gcc/cp/parser.c:37667
More information about the Gcc-bugs
mailing list