https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88257
Bug ID: 88257 Summary: [9 Regression] ICE in linemap_position_for_line_and_column, at libcpp/line-map.c:842 Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++-9.0.0-alpha20181125 snapshot (r266441) ICEs when compiling gcc/testsuite/gcc.dg/format/pr78304.c w/ -Wformat: % g++-9.0.0-alpha20181125 -Wformat -c gcc/testsuite/gcc.dg/format/pr78304.c gcc/testsuite/gcc.dg/format/pr78304.c: In function 'void test(const char*)': gcc/testsuite/gcc.dg/format/pr78304.c:9:37: internal compiler error: in linemap_position_for_line_and_column, at libcpp/line-map.c:842 9 | printf ("size: %" PRIu32 "\n", msg); /* { dg-warning "expects argument of type" } */ | ^ 0x18631a5 linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/libcpp/line-map.c:842 0x18631a5 linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/libcpp/line-map.c:837 0x1844d06 get_substring_ranges_for_loc /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/input.c:1437 0x18455fb get_location_within_string(cpp_reader*, string_concat_db*, unsigned int, cpp_ttype, int, int, int, unsigned int*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/input.c:1490 0xa17d26 c_get_substring_location(substring_loc const&, unsigned int*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-common.c:879 0xa4e2c5 get_corrected_substring /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:3503 0xa4e2c5 format_type_warning /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:3718 0xa4f855 check_format_types /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:3262 0xa4f855 argument_parser::check_argument_type(format_char_info const*, length_modifier const&, tree_node*&, char const*&, bool, unsigned long&, tree_node*&, int, char const*, char const*, unsigned int, char) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:2776 0xa52f70 argument_parser::check_argument_type(format_char_info const*, length_modifier const&, tree_node*&, char const*&, bool, unsigned long&, tree_node*&, int, char const*, char const*, unsigned int, char) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:2671 0xa52f70 check_format_info_main /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:2988 0xa52f70 check_format_arg /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:1740 0xa503ff check_format_info /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:1463 0xa503ff check_function_format(tree_node const*, tree_node*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-format.c:1120 0xa41be1 check_function_arguments(unsigned int, tree_node const*, tree_node const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/c-family/c-common.c:5675 0x823f64 build_over_call /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cp/call.c:8263 0x8314ac build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cp/call.c:4407 0x9be30d finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cp/semantics.c:2560 0x93a578 cp_parser_postfix_expression /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cp/parser.c:7300 0x948609 cp_parser_unary_expression /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cp/parser.c:8382