https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118674
Bug ID: 118674 Summary: ICE: Segmentation fault 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 60297 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60297&action=edit testcase Compiler Explorer: https://godbolt.org/z/7e35Y7ajn console: <source>:2:17: warning: '__VA_ARGS__' can only appear in the expansion of a C99 variadic macro 2 | #define A(mode, __VA_ARGS__, ...) __attribute__ ((access (mode))) | ^ <source>:2:30: error: duplicate macro parameter '__VA_ARGS__' 2 | #define A(mode, __VA_ARGS__, ...) __attribute__ ((access (mode))) | ^~~ <source>:1: internal compiler error: Segmentation fault 1 | 0x25ebea5 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2602ca6 internal_error(char const*, ...) ???:0 0x269db3e _cpp_create_definition ???:0 0x267da98 _cpp_handle_directive ???:0 0x2694778 _cpp_lex_token ???:0 0xb1a0fa c_lex_with_flags(tree_node**, unsigned long*, unsigned char*, int) ???:0 0xab0229 c_parse_file() ???:0 0xb2eda9 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. Compiler returned: 1