Bug 87643 - [9 regression] ICE at dbxout.c:508:1: linemap_position_for_line_and_column starting with r264887
Summary: [9 regression] ICE at dbxout.c:508:1: linemap_position_for_line_and_column st...
Status: RESOLVED DUPLICATE of bug 87562
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 14:42 UTC by seurer
Modified: 2018-10-18 14:55 UTC (History)
1 user (show)

See Also:
Host: powerpc64le-unknown-linux-gnu
Target: powerpc64le-unknown-linux-gnu
Build: powerpc64le-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seurer 2018-10-18 14:42:11 UTC
This error occurs in compiling the 502.gcc_r and 602.gcc_r parts of SPEC2017.  I've only tried it on powerpc64le.

seurer@genoa:~/gcc/cpu2017/benchspec/CPU/502.gcc_r/build/build_base_test_64.0001$ /home/seurer/gcc/install/gcc-test/bin/gcc -c -o dbxout.o -DSPEC -DNDEBUG -I. -I./include -I./spec_qsort -DSPEC_502 -DSPEC_AUTO_SUPPRESS_OPENMP -DIN_GCC -DHAVE_CONFIG_H  -m64 -O3 -mcpu=power8 -fpeel-loops -funroll-loops -ffast-math -mpopcntd -mrecip        -DSPEC_LP64 -Wno-deprecated-declarations       -fgnu89-inline  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:848
508 | dbxout_stab_value_internal_label (const char *stem, int *counterp)
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x116070af linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int)
	/home/seurer/gcc/gcc-test/libcpp/line-map.c:848
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.


Breakpoint 1, linemap_position_for_line_and_column (set=0x3fffb7f70000, ord_map=0x3fffb5c5eb68, line=124, column=23) at /home/seurer/gcc/gcc-test/libcpp/line-map.c:848
848	  linemap_assert (ORDINARY_MAP_STARTING_LINE_NUMBER (ord_map) <= line);
(gdb) where
#0  linemap_position_for_line_and_column (set=0x3fffb7f70000, ord_map=0x3fffb5c5eb68, line=124, column=23) at /home/seurer/gcc/gcc-test/libcpp/line-map.c:848
#1  0x00000000115ddafc in get_substring_ranges_for_loc (pfile=0x12003e20, concats=0x3fffb5cc0000, strloc=<optimized out>, type=CPP_STRING, ranges=...)
    at /home/seurer/gcc/gcc-test/gcc/input.c:1465
#2  0x00000000115de88c in get_source_location_for_substring (pfile=0x12003e20, concats=0x3fffb5cc0000, strloc=<optimized out>, type=<optimized out>, caret_idx=<optimized out>, 
    start_idx=<optimized out>, end_idx=<optimized out>, out_loc=0x3fffffffe2c0) at /home/seurer/gcc/gcc-test/gcc/input.c:1517
#3  0x00000000102db7ac in c_get_substring_location (substr_loc=..., out_loc=<optimized out>) at /home/seurer/gcc/gcc-test/gcc/c-family/c-common.c:867
#4  0x0000000010a1701c in substring_loc::get_location (out_loc=0x3fffffffe2c0, this=0x3fffffffe480) at /home/seurer/gcc/gcc-test/gcc/substring-locations.c:284
#5  format_string_diagnostic_t::emit_warning_n_va (this=0x3fffffffe360, opt=<optimized out>, n=0, 
    singular_gmsgid=0x11b7ace0 "%<%.*s%> directive writing likely %wu or more bytes into a region of size %wu", 
    plural_gmsgid=0x11b7ace0 "%<%.*s%> directive writing likely %wu or more bytes into a region of size %wu", ap=0x3fffffffe388)
    at /home/seurer/gcc/gcc-test/gcc/substring-locations.c:156
#6  0x0000000011434bec in (anonymous namespace)::fmtwarn (fmt_loc=..., param_loc=0, corrected_substring=0x0, opt=<optimized out>, 
    gmsgid=0x11b7ace0 "%<%.*s%> directive writing likely %wu or more bytes into a region of size %wu", corrected_substring=0x0)
    at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:472
#7  0x0000000011437b2c in (anonymous namespace)::maybe_warn (dir=..., dir=..., res=..., avail_range=<synthetic pointer>, info=..., argloc=0, dirloc=...)
    at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:2593
#8  (anonymous namespace)::format_directive (info=..., res=0x3fffffffe748, dir=..., vr_values=0x12483fc0) at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:2822
#9  0x000000001143b654 in (anonymous namespace)::sprintf_dom_walker::compute_format_length (res=0x3fffffffe748, info=..., this=0x3fffffffea00)
    at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:3502
#10 (anonymous namespace)::sprintf_dom_walker::handle_gimple_call (this=0x3fffffffea00, gsi=0x3fffffffe930) at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:3988
#11 0x000000001143cbac in (anonymous namespace)::sprintf_dom_walker::before_dom_children (this=0x3fffffffea00, bb=<optimized out>)
    at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:4027
#12 0x00000000113e1300 in dom_walker::walk (this=0x3fffffffea00, bb=0x3fffb5eb8a88) at /home/seurer/gcc/gcc-test/gcc/domwalk.c:353
#13 0x000000001143481c in (anonymous namespace)::pass_sprintf_length::execute (this=<optimized out>, fun=0x3fffadc8a3a0)
    at /home/seurer/gcc/gcc-test/gcc/gimple-ssa-sprintf.c:4053
#14 0x00000000108e79f4 in execute_one_pass (pass=0x1202f4d0) at /home/seurer/gcc/gcc-test/gcc/passes.c:2428
#15 0x00000000108e8b24 in execute_pass_list_1 (pass=0x1202f4d0) at /home/seurer/gcc/gcc-test/gcc/passes.c:2517
#16 0x00000000108e8b3c in execute_pass_list_1 (pass=0x1202d460) at /home/seurer/gcc/gcc-test/gcc/passes.c:2518
#17 0x00000000108e8bc8 in execute_pass_list (fn=<optimized out>, pass=<optimized out>) at /home/seurer/gcc/gcc-test/gcc/passes.c:2528
#18 0x0000000010451790 in cgraph_node::expand (this=0x3fffadd7c210) at /home/seurer/gcc/gcc-test/gcc/cgraphunit.c:2189
#19 0x0000000010453334 in expand_all_functions () at /home/seurer/gcc/gcc-test/gcc/cgraphunit.c:2327
#20 symbol_table::compile (this=0x3fffb5cb0000) at /home/seurer/gcc/gcc-test/gcc/cgraphunit.c:2678
#21 0x0000000010456e48 in symbol_table::compile (this=0x3fffb5cb0000) at /home/seurer/gcc/gcc-test/gcc/cgraphunit.c:2820
#22 symbol_table::finalize_compilation_unit (this=0x3fffb5cb0000) at /home/seurer/gcc/gcc-test/gcc/cgraphunit.c:2856
#23 0x0000000010a207e4 in compile_file () at /home/seurer/gcc/gcc-test/gcc/toplev.c:480
#24 0x00000000101fda30 in do_compile () at /home/seurer/gcc/gcc-test/gcc/toplev.c:2170
#25 toplev::main (this=0x3fffffffefa0, argc=<optimized out>, argv=<optimized out>) at /home/seurer/gcc/gcc-test/gcc/toplev.c:2305
#26 0x00000000101ffda8 in main (argc=<optimized out>, argv=0x3ffffffff3c8) at /home/seurer/gcc/gcc-test/gcc/main.c:39
(gdb) c
Continuing.
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:848
508 | dbxout_stab_value_internal_label (const char *stem, int *counterp)
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x116070af linemap_position_for_line_and_column(line_maps*, line_map_ordinary const*, unsigned int, unsigned int)
	/home/seurer/gcc/gcc-test/libcpp/line-map.c:848
Comment 1 David Malcolm 2018-10-18 14:51:41 UTC
Sorry about this; it's a duplicate of PR 87562.  I'm testing a fix.

*** This bug has been marked as a duplicate of bug 87562 ***
Comment 2 seurer 2018-10-18 14:55:47 UTC
Sorry for the duplicate.  I am not having much success with searches lately...