[Bug c++/79653] New: ICE on invalid c++ code in cp_check_const_attributes in cp/decl2.c:1423
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 21 08:23:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79653
Bug ID: 79653
Summary: ICE on invalid c++ code in cp_check_const_attributes
in cp/decl2.c:1423
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Created attachment 40791
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40791&action=edit
test-case
Adopted from clang:
$ g++
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp:3:28:
error: requested alignment is not a positive power of 2
int align_illegal alignas(3); //expected-error {{requested alignment is not a
power of 2}}
^
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp:11:25:
error: function definition does not declare parameters
int bitfield alignas(1) : 1; // expected-error {{}}
^
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp:14:24:
error: alignment may not be specified for ‘c’
void f(alignas(1) char c) { // expected-error {{'alignas' attribute cannot be
applied to a function parameter}}
^
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp:26:19:
error: expansion pattern ‘#‘tree_list’ not supported by dump_expr#<expression
error>’ contains no argument packs
struct alignas(int...) alignas_expansion_no_packs {}; // expected-error {{pack
expansion does not contain any unexpanded parameter packs}}
^~~
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/attr-cxx0x.cpp:26:24:
internal compiler error: tree check: expected tree_list, have error_mark in
cp_check_const_attributes, at cp/decl2.c:1351
struct alignas(int...) alignas_expansion_no_packs {}; // expected-error {{pack
expansion does not contain any unexpanded parameter packs}}
^~~~~~~~~~~~~~~~~~~~~~~~~~
0x15410ca tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9815
0x80d4d6 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3064
0x95cfd7 cp_check_const_attributes
../../gcc/cp/decl2.c:1351
0x95d5ce cplus_decl_attributes(tree_node**, tree_node*, int)
../../gcc/cp/decl2.c:1423
0x9b04ca cp_parser_class_head
../../gcc/cp/parser.c:22805
0x9ae06f cp_parser_class_specifier_1
../../gcc/cp/parser.c:22055
0x9af194 cp_parser_class_specifier
../../gcc/cp/parser.c:22368
0x9a2ec6 cp_parser_type_specifier
../../gcc/cp/parser.c:16441
0x99dd17 cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:13352
0x99c73a cp_parser_simple_declaration
../../gcc/cp/parser.c:12676
0x99c6c2 cp_parser_block_declaration
../../gcc/cp/parser.c:12621
0x99c444 cp_parser_declaration
../../gcc/cp/parser.c:12518
0x99bf9d cp_parser_declaration_seq_opt
../../gcc/cp/parser.c:12394
0x98a935 cp_parser_translation_unit
../../gcc/cp/parser.c:4366
0x9dbd52 c_parse_file()
../../gcc/cp/parser.c:38430
0xb8e93c c_common_parse_file()
../../gcc/c-family/c-opts.c:1107
More information about the Gcc-bugs
mailing list