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

            Bug ID: 121033
           Summary: ICE on x86_64-linux-gnu: Segmentation fault with
                    invalid new-line in raw string delimiter
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangchangwu at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/M4MeqenqG

*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk --enable-coverage
--disable-werror --enable-checking=yes
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20250613 (experimental) (GCC)

*******************************************************************************
Program:
$ cat mutant.c
#define a(b, c) b##c
a(R, "")

*******************************************************************************
Command Lines:
$ gcc mutant.c
mutant.c:2:4: error: invalid new-line in raw string delimiter
    2 | a(R, "")
      | ^   
mutant.c:2:1: error: unterminated raw string
mutant.c:2:1: internal compiler error: Segmentation fault
0x5554b38 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x21651ec crash_signal
        ../../gcc/gcc/toplev.cc:321
0x56925c4 paste_tokens
        ../../gcc/libcpp/macro.cc:1051
0x56958ed paste_all_tokens
        ../../gcc/libcpp/macro.cc:1150
0x56958ed cpp_get_token_1
        ../../gcc/libcpp/macro.cc:3028
0x119e5cc get_token
        ../../gcc/gcc/c-family/c-lex.cc:316
0x119f75b c_lex_with_flags(tree_node**, unsigned long*, unsigned char*, int)
        ../../gcc/gcc/c-family/c-lex.cc:579
0xff0c86 c_lex_one_token
        ../../gcc/gcc/c/c-parser.cc:329
0xff16da c_parser_peek_token(c_parser*)
        ../../gcc/gcc/c/c-parser.cc:533
0x10a15d8 c_parse_file()
        ../../gcc/gcc/c/c-parser.cc:30139
0x11d7aeb c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.cc:1385
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.
  • [Bug c/121033] New: ICE ... jiangchangwu at smail dot nju.edu.cn via Gcc-bugs

Reply via email to