[Bug preprocessor/58844] New: [4.8/4.9 Regression] ICE with invalid use of ##

reichelt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 22 12:17:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58844

            Bug ID: 58844
           Summary: [4.8/4.9 Regression] ICE with invalid use of ##
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet triggers an ICE since GCC 4.8.0:

======================
#define X A######A
X
======================

bug.c:2:1: internal compiler error: Segmentation fault
 X
 ^
0x963a4f crash_signal
        ../../gcc/gcc/toplev.c:335
0xe7c107 paste_all_tokens
        ../../gcc/libcpp/macro.c:668
0xe7c107 cpp_get_token_1
        ../../gcc/libcpp/macro.c:2364
0x5d087c c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
        ../../gcc/gcc/c-family/c-lex.c:300
0x56d103 c_lex_one_token
        ../../gcc/gcc/c/c-parser.c:223
0x56e240 c_parser_peek_2nd_token
        ../../gcc/gcc/c/c-parser.c:447
0x58653e c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.c:1482
0x589285 c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.c:1380
0x589d21 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.c:1267
0x589d21 c_parse_file()
        ../../gcc/gcc/c/c-parser.c:13222
0x5d8683 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]



More information about the Gcc-bugs mailing list