https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87630
Bug ID: 87630 Summary: [9 Regression] ICE in linemap_position_for_line_and_column, at libcpp/line-map.c:842 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Created attachment 44844 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44844&action=edit unreduced testcase Recently 502.gcc started to fail with > gcc -std=gnu99 -m64 -c -o dbxout.o -DSPEC -DNDEBUG -I. -I./include > -I./spec_qsort -DSPEC_502 -DSPEC_AUTO_SUPPRESS_OPENMP -DIN_GCC > -DHAVE_CONFIG_H -Ofast -g -march=native -mtune=native > -mprefer-vector-width=128 -fgnu89-inline -DSPEC_LP64 dbxout.c during GIMPLE pass: printf-return-value dbxout.c: In function ‘dbxout_stab_value_internal_label’: dbxout.c:508:1: internal compiler error: in linemap_position_for_line_and_column, at libcpp/line-map.c:842 508 | dbxout_stab_value_internal_label (const char *stem, int *counterp) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x15d3cdb linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int) ../../trunk/libcpp/line-map.c:842 0x15d3cdb linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int) ../../trunk/libcpp/line-map.c:837 0x15b6eaa get_substring_ranges_for_loc ../../trunk/gcc/input.c:1464 0x15b7684 get_source_location_for_substring(cpp_reader*, string_concat_db*, unsigned int, cpp_ttype, int, int, int, unsigned int*) ../../trunk/gcc/input.c:1517 0x80c22f c_get_substring_location(substring_loc const&, unsigned int*) ../../trunk/gcc/c-family/c-common.c:861 0xccc7a4 substring_loc::get_location(unsigned int*) const ../../trunk/gcc/substring-locations.c:284 0xccc7a4 format_string_diagnostic_t::emit_warning_n_va(int, unsigned long, char const*, char const*, __va_list_tag (*) [1]) const ../../trunk/gcc/substring-locations.c:156 0x14966f8 fmtwarn ../../trunk/gcc/gimple-ssa-sprintf.c:472 0x1497b5e maybe_warn ../../trunk/gcc/gimple-ssa-sprintf.c:2706 0x1497b5e format_directive ../../trunk/gcc/gimple-ssa-sprintf.c:2822 0x149b89c compute_format_length ../../trunk/gcc/gimple-ssa-sprintf.c:3502 0x149b89c handle_gimple_call ../../trunk/gcc/gimple-ssa-sprintf.c:3988 0x149cd5d before_dom_children ../../trunk/gcc/gimple-ssa-sprintf.c:4027 0x145a4c2 dom_walker::walk(basic_block_def*) ../../trunk/gcc/domwalk.c:353 0x14963cb execute ../../trunk/gcc/gimple-ssa-sprintf.c:4053 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.