public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/97991] ICE in c_parser_consume_token, at c/c-parser.c:850
Date: Wed, 25 Nov 2020 17:03:32 +0000	[thread overview]
Message-ID: <bug-97991-4-2fjhO4eTLj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97991-4@http.gcc.gnu.org/bugzilla/>

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

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

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

--- Comment #1 from G. Steinmetz <gscfq@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	other threads:[~2020-11-25 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 17:02 [Bug c/97991] New: " gscfq@t-online.de
2020-11-25 17:03 ` gscfq@t-online.de [this message]
2020-11-26 10:02 ` [Bug c/97991] " marxin at gcc dot gnu.org
2021-09-20 22:15 ` [Bug c/97991] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-21 13:24 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug c/97991] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug c/97991] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-07-19 13:09 ` [Bug c/97991] [12/13/14/15 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-97991-4-2fjhO4eTLj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).