public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96329] New: [11 Regression] ICE : tree check: expected string_cst, have error_mark in cp_parser_linkage_specification, at cp/parser.c:14640
@ 2020-07-27  9:40 haoxintu at gmail dot com
  2020-07-27 10:19 ` [Bug c++/96329] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: haoxintu at gmail dot com @ 2020-07-27  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96329
           Summary: [11 Regression] ICE : tree check: expected string_cst,
                    have error_mark in cp_parser_linkage_specification, at
                    cp/parser.c:14640
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi, all.

This simple invalide code makes GCC ICE.

Input:
//test.cc
extern "C" ""a

Command:
g++ test.cc

Output:
test.cc:1:12: error: unable to find string literal operator ‘operator""a’ with
‘const char [2]’, ‘long unsigned int’ arguments
    1 | extern "C" ""a
      |            ^~~
test.cc:1:12: internal compiler error: tree check: expected string_cst, have
error_mark in cp_parser_linkage_specification, at cp/parser.c:14640
0x7c524f tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9685
0x64d693 cp_parser_linkage_specification
        ../../gcc/tree.h:3301
0x9cfa9a cp_parser_declaration
        ../../gcc/cp/parser.c:13421
0x9d015a cp_parser_translation_unit
        ../../gcc/cp/parser.c:4761
0x9d015a c_parse_file()
        ../../gcc/cp/parser.c:44043
0xae920b c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

I tested in GCC trunk 20200726, and it seems not to make GCC-10 or downwards 
versions crashed. 

Thanks,
Haoxin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-09 16:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  9:40 [Bug c++/96329] New: [11 Regression] ICE : tree check: expected string_cst, have error_mark in cp_parser_linkage_specification, at cp/parser.c:14640 haoxintu at gmail dot com
2020-07-27 10:19 ` [Bug c++/96329] " marxin at gcc dot gnu.org
2020-07-27 12:46 ` rguenth at gcc dot gnu.org
2021-04-27 11:39 ` [Bug c++/96329] [11/12 " jakub at gcc dot gnu.org
2021-07-28  7:04 ` rguenth at gcc dot gnu.org
2022-03-07 13:03 ` roger at nextmovesoftware dot com
2022-03-08 23:19 ` cvs-commit at gcc dot gnu.org
2022-03-09 16:01 ` roger at nextmovesoftware dot com

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).