https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85140
Bug ID: 85140 Summary: ICE with invalid use of alignas Product: gcc Version: 8.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 coide snippet triggers an ICE since GCC 4.8.0: ============================= namespace N alignas() {} ============================= bug.cc:1:21: error: expected primary-expression before ')' token namespace N alignas() {} ^ bug.cc:1:24: internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:835 namespace N alignas() {} ^ 0x78c848 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9322 0x9fa8a5 tree_check(tree_node const*, char const*, int, char const*, tree_code) ../../gcc/gcc/tree.h:3391 0x9fa8a5 get_attribute_name(tree_node const*) ../../gcc/gcc/attribs.c:835 0x8ffbad handle_namespace_attrs(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:5049 0x9496bf cp_parser_namespace_definition ../../gcc/gcc/cp/parser.c:18585 0x948cd3 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12762 0x948fd1 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12658 0x9492c4 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4563 0x9492c4 c_parse_file() ../../gcc/gcc/cp/parser.c:39024 0xa48b26 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.]