https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69985
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Created attachment 37813 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37813&action=edit c file (In reply to Manuel López-Ibáñez from comment #4) > (In reply to Markus Trippelsdorf from comment #0) > > If I move the cmds-check.i file to a different directory gcc no longer ICEs, > > so reducing is impossible. > > One idea. Do you still have cmds-check.c in that subdir? > location_from_offset will try to re-open the file to find the visual column > because GCC's internal representation does not capture this info. Bingo! With both files present I can even reproduce it on my x86_64 machine. markus@x4 tmp % gcc -w -c -Wall cmds-check.i cmds-check.c: In function ‘check_chunk_refs’: cmds-check.c:7849:6: internal compiler error: in linemap_position_for_loc_and_offset, at libcpp/line-map.c:924 block_group_rec->flags); ^~~~~~~~~~~~~~~ 0x12b30ca linemap_position_for_loc_and_offset(line_maps*, unsigned int, unsigned int) ../../gcc/libcpp/line-map.c:924 0x593a2f location_from_offset ../../gcc/gcc/c-family/c-format.c:139 0x593b7a format_type_warning ../../gcc/gcc/c-family/c-format.c:2672 0x698f32 check_format_types ../../gcc/gcc/c-family/c-format.c:2616 0x698f32 check_format_info_main ../../gcc/gcc/c-family/c-format.c:2424 0x698f32 check_format_arg ../../gcc/gcc/c-family/c-format.c:1688 0x6960b7 check_format_info ../../gcc/gcc/c-family/c-format.c:1423 0x6960b7 check_function_format(tree_node*, int, tree_node**) ../../gcc/gcc/c-family/c-format.c:1093 0x6874c6 check_function_arguments(unsigned int, tree_node const*, int, tree_node**) ../../gcc/gcc/c-family/c-common.c:9695 0x6061d4 build_function_call_vec(unsigned int, vec<unsigned int, va_heap, vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc, vl_embed>*) ../../gcc/gcc/c/c-typeck.c:3051 0x625f0d c_parser_postfix_expression_after_primary ../../gcc/gcc/c/c-parser.c:8262 0x61ca09 c_parser_postfix_expression ../../gcc/gcc/c/c-parser.c:8075 0x61f74a c_parser_unary_expression ../../gcc/gcc/c/c-parser.c:6893 0x620547 c_parser_cast_expression ../../gcc/gcc/c/c-parser.c:6722 0x620762 c_parser_binary_expression ../../gcc/gcc/c/c-parser.c:6531 0x621425 c_parser_conditional_expression ../../gcc/gcc/c/c-parser.c:6302 0x621ac0 c_parser_expr_no_commas ../../gcc/gcc/c/c-parser.c:6219 0x622222 c_parser_expression ../../gcc/gcc/c/c-parser.c:8404 0x622c69 c_parser_expression_conv ../../gcc/gcc/c/c-parser.c:8437 0x63c441 c_parser_statement_after_labels ../../gcc/gcc/c/c-parser.c:5275