https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118899
Bug ID: 118899 Summary: ICE: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.cc:1063 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bic60176 at gmail dot com Target Milestone: --- Created attachment 60514 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60514&action=edit testcase Compiler Explorer: https://godbolt.org/z/d6KMohseK console: <source>: In function 'test_pointers': <source>:6:5: error: implicit declaration of function 'Assert' [-Wimplicit-function-declaration] 6 | Assert(!expect || __alignof__(expr) == align); \ | ^~~~~~ <source>:26:3: note: in expansion of macro 'A3' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~ <source>:26:13: error: expected expression before 'P64_P_P32_P_P16_I8' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:6:44: note: in definition of macro 'A3' 6 | Assert(!expect || __alignof__(expr) == align); \ | ^~~~~ <source>:26:13: error: expected expression before 'P64_P_P32_P_P16_I8' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:7:60: note: in definition of macro 'A3' 7 | Assert(expect == __builtin_has_attribute(expr, aligned(align))); \ | ^~~~~ <source>:26:13: internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.cc:1063 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:7:60: note: in definition of macro 'A3' 7 | Assert(expect == __builtin_has_attribute(expr, aligned(align))); \ | ^~~~~ 0x25f34a5 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x260a576 internal_error(char const*, ...) ???:0 0x8f3842 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xb52e81 has_attribute(unsigned long, tree_node*, tree_node*, tree_node* (*)(tree_node*)) ???:0 0xab140e c_parse_file() ???:0 0xb2fec9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ASM generation compiler returned: 1 <source>: In function 'test_pointers': <source>:6:5: error: implicit declaration of function 'Assert' [-Wimplicit-function-declaration] 6 | Assert(!expect || __alignof__(expr) == align); \ | ^~~~~~ <source>:26:3: note: in expansion of macro 'A3' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~ <source>:26:13: error: expected expression before 'P64_P_P32_P_P16_I8' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:6:44: note: in definition of macro 'A3' 6 | Assert(!expect || __alignof__(expr) == align); \ | ^~~~~ <source>:26:13: error: expected expression before 'P64_P_P32_P_P16_I8' 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:7:60: note: in definition of macro 'A3' 7 | Assert(expect == __builtin_has_attribute(expr, aligned(align))); \ | ^~~~~ <source>:26:13: internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.cc:1063 26 | A3(0, 32, P64_P_P32_P_P16_I8); | ^~~~~~~~~~~~~~~~~~ <source>:7:60: note: in definition of macro 'A3' 7 | Assert(expect == __builtin_has_attribute(expr, aligned(align))); \ | ^~~~~ 0x25f34a5 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x260a576 internal_error(char const*, ...) ???:0 0x8f3842 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xb52e81 has_attribute(unsigned long, tree_node*, tree_node*, tree_node* (*)(tree_node*)) ???:0 0xab140e c_parse_file() ???:0 0xb2fec9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Execution build compiler returned: 1