https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81289
Bug ID: 81289 Summary: [8 Regression] ICE in libcpp/line-map.c 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: asolokha at gmx dot com Target Milestone: --- Target: powerpc-*-linux-gnu*, powerpcspe-*-linux-gnu* gcc-8.0.0-alpha20170625 snapshot ICEs most of the time in one of the following ways when compiling this snippet: --------8<-------- ke () { mm == *&& -------->8-------- ICE 1: % powerpc-e300c3-linux-gnu-gcc-8.0.0-alpha20170625 -w pnr6edbg.c pnr6edbg.c: In function 'ke': pnr6edbg.c:3:3: error: 'mm' undeclared (first use in this function) mm == *&& ^~ pnr6edbg.c:3:3: note: each undeclared identifier is reported only once for each function it appears in pnr6edbg.c:3:3: error: expected identifier at end of input pnr6edbg.c:3:3: internal compiler error: Segmentation fault 0xc5e1f9 crash_signal /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/toplev.c:338 0x14e4064 get_range_from_adhoc_loc /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/libcpp/line-map.c:276 0x14e4064 get_range_from_loc(line_maps*, unsigned int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/libcpp/line-map.c:287 0x14beffb get_finish /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/input.h:107 0x14beffb make_location(unsigned int, unsigned int, unsigned int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/input.c:859 0x637cb4 c_parser_unary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:7014 0x638d87 c_parser_cast_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6927 0x63960e c_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6857 0x63a1b7 c_parser_conditional_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6475 0x63a9b5 c_parser_expr_no_commas /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6392 0x63ac6d c_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:8623 0x63d363 c_parser_expression_conv /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:8656 0x6506c8 c_parser_statement_after_labels /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:5410 0x6521c4 c_parser_compound_statement_nostart /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:4924 0x65275e c_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:4757 0x64e29a c_parser_declaration_or_fndef /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:2125 0x655dd6 c_parser_external_declaration /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:1469 0x6567f1 c_parser_translation_unit /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:1349 0x6567f1 c_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:18131 0x6bda82 c_common_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c-family/c-opts.c:1104 ICE 2: % powerpc-e300c3-linux-gnu-gcc-8.0.0-alpha20170625 -O2 -w pnr6edbg.c pnr6edbg.c: In function 'ke': pnr6edbg.c:3:3: error: 'mm' undeclared (first use in this function) mm == *&& ^~ pnr6edbg.c:3:3: note: each undeclared identifier is reported only once for each function it appears in pnr6edbg.c:3:3: error: expected identifier at end of input pnr6edbg.c:3:3: internal compiler error: in linemap_macro_map_lookup, at libcpp/line-map.c:1013 0x14e3f6d linemap_macro_map_lookup /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/libcpp/line-map.c:1013 0x14e3f6d linemap_lookup(line_maps*, unsigned int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/libcpp/line-map.c:947 0x14e3ffc get_range_from_loc(line_maps*, unsigned int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/libcpp/line-map.c:294 0x14beffb get_finish /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/input.h:107 0x14beffb make_location(unsigned int, unsigned int, unsigned int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/input.c:859 0x637cb4 c_parser_unary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:7014 0x638d87 c_parser_cast_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6927 0x63960e c_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6857 0x63a1b7 c_parser_conditional_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6475 0x63a9b5 c_parser_expr_no_commas /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:6392 0x63ac6d c_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:8623 0x63d363 c_parser_expression_conv /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:8656 0x6506c8 c_parser_statement_after_labels /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:5410 0x6521c4 c_parser_compound_statement_nostart /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:4924 0x65275e c_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:4757 0x64e29a c_parser_declaration_or_fndef /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:2125 0x655dd6 c_parser_external_declaration /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:1469 0x6567f1 c_parser_translation_unit /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:1349 0x6567f1 c_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c/c-parser.c:18131 0x6bda82 c_common_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20170625/work/gcc-8-20170625/gcc/c-family/c-opts.c:1104