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

            Bug ID: 83595
           Summary: [8 Regression] ICE: in linemap_macro_map_lookup, at
                    libcpp/line-map.c:1008 on invalid code
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---

Created attachment 42967
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42967&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.c   
testcase.c: In function 'foo':
testcase.c:4:5: error: expected expression before ')' token
   (())((int){0);
     ^
testcase.c:4:5: internal compiler error: in linemap_macro_map_lookup, at
libcpp/line-map.c:1008
0x17b7a07 linemap_macro_map_lookup
        /repo/gcc-trunk/libcpp/line-map.c:1008
0x17b7a07 linemap_lookup(line_maps*, unsigned int)
        /repo/gcc-trunk/libcpp/line-map.c:942
0x17b8619 get_pure_location(line_maps*, unsigned int)
        /repo/gcc-trunk/libcpp/line-map.c:335
0x17978e6 get_pure_location
        /repo/gcc-trunk/gcc/input.h:91
0x17978e6 make_location(unsigned int, unsigned int, unsigned int)
        /repo/gcc-trunk/gcc/input.c:890
0x97b9fd c_expr::get_location() const
        /repo/gcc-trunk/gcc/c/c-tree.h:155
0x97b9fd c_parser_expr_list
        /repo/gcc-trunk/gcc/c/c-parser.c:9390
0x97c3fc c_parser_postfix_expression_after_primary
        /repo/gcc-trunk/gcc/c/c-parser.c:9128
0x96cc3b c_parser_postfix_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:8978
0x976362 c_parser_unary_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:7258
0x97720a c_parser_cast_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:7102
0x977462 c_parser_binary_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:6905
0x978275 c_parser_conditional_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:6643
0x9788c0 c_parser_expr_no_commas
        /repo/gcc-trunk/gcc/c/c-parser.c:6560
0x978b12 c_parser_expression
        /repo/gcc-trunk/gcc/c/c-parser.c:9290
0x97ab96 c_parser_expression_conv
        /repo/gcc-trunk/gcc/c/c-parser.c:9323
0x985fe0 c_parser_statement_after_labels
        /repo/gcc-trunk/gcc/c/c-parser.c:5538
0x988079 c_parser_compound_statement_nostart
        /repo/gcc-trunk/gcc/c/c-parser.c:5076
0x988586 c_parser_compound_statement
        /repo/gcc-trunk/gcc/c/c-parser.c:4911
0x989c9c c_parser_declaration_or_fndef
        /repo/gcc-trunk/gcc/c/c-parser.c:2340
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-255981-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-255981-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 8.0.0 20171222 (experimental) (GCC)

Reply via email to