https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97991

G. Steinmetz <gs...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-pc-linux-gnu
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from G. Steinmetz <gs...@t-online.de> ---

A special case, loosely related :


$ cat z2.c
#define foo _Pragma (" ")
#pragma redefine_extname foo


$ gcc-11-20201122 -c z2.c -Wall
z2.c:2:2: internal compiler error: unspellable token PRAGMA_EOL
    2 | #pragma redefine_extname foo
      |  ^
0x6c46ba c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level,
cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1])
        ../../gcc/c-family/c-common.c:6414
0x1522c92 cpp_diagnostic
        ../../libcpp/errors.c:75
0x1522e16 cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...)
        ../../libcpp/errors.c:89
0x152c22d cpp_spell_token(cpp_reader*, cpp_token const*, unsigned char*, bool)
        ../../libcpp/lex.c:3541
0x152dac7 cpp_token_as_text(cpp_reader*, cpp_token const*)
        ../../libcpp/lex.c:3557
0x6d6022 cb_def_pragma
        ../../gcc/c-family/c-lex.c:255
0x151f880 do_pragma
        ../../libcpp/directives.c:1539
0x15224fd destringize_and_run
        ../../libcpp/directives.c:1885
0x15226cc _cpp_do__Pragma
        ../../libcpp/directives.c:1963
0x1536eb6 builtin_macro
        ../../libcpp/macro.c:744
0x15344b2 enter_macro_context
        ../../libcpp/macro.c:1562
0x153624d cpp_get_token_1
        ../../libcpp/macro.c:2925
0x6d757d c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
        ../../gcc/c-family/c-lex.c:470
0x664e4f c_lex_one_token
        ../../gcc/c/c-parser.c:279
0x668809 c_parser_peek_token(c_parser*)
        ../../gcc/c/c-parser.c:483
0x668809 pragma_lex(tree_node**, unsigned int*)
        ../../gcc/c/c-parser.c:12540
0x6e4313 handle_pragma_redefine_extname
        ../../gcc/c-family/c-pragma.c:499
0x66e6bf c_parser_pragma
        ../../gcc/c/c-parser.c:12524
0x6909f3 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1758
0x691569 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1650

Reply via email to