https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

            Bug ID: 87721
           Summary: [9 Regression] ICE in
                    linemap_position_for_line_and_column at
                    gcc/libcpp/line-map.c:842 since r265271
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Hi.

This is follow up of PR87562 which was introduced by commit that fixed the
issue.
Unfortunately I can't reproduce that with -E -C so that one needs to do
following:

$ wget https://github.com/aqbanking/gwenhywfar/archive/4.20.1.tar.gz
$ tar xvzf 4.20.1.tar.gz
$ cd gwenhywfar-4.20.1
$ autoreconf -ifv && ./configure --with-guis && make -j8
...
make[4]: Entering directory
'/home/marxin/BIG/osc/home:marxin:gcc9-incubator-v1/gwenhywfar/gwenhywfar-4.20.1/src/base'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H
-DGWEN_BUFFER_DEFAULT_HARDLIMIT='(16*1024*1024)' -I. -I../..
-I../../gwenhywfar4 -I../../src/ -I../../src/base -I../../src/gui
-I../../src/io -I../../src/ipc -I../../src/parser   -fvisibility=hidden 
-DBUILDING_GWENHYWFAR -g -O2 -Wall -Wall -MT plugin.lo -MD -MP -MF
.deps/plugin.Tpo -c -o plugin.lo plugin.c
libtool: compile:  gcc -DHAVE_CONFIG_H
"-DGWEN_BUFFER_DEFAULT_HARDLIMIT=(16*1024*1024)" -I. -I../..
-I../../gwenhywfar4 -I../../src/ -I../../src/base -I../../src/gui
-I../../src/io -I../../src/ipc -I../../src/parser -fvisibility=hidden
-DBUILDING_GWENHYWFAR -g -O2 -Wall -Wall -MT plugin.lo -MD -MP -MF
.deps/plugin.Tpo -c plugin.c  -fPIC -DPIC -o .libs/plugin.o
during GIMPLE pass: printf-return-value
plugin.c: In function ‘GWEN_PluginManager_LoadPlugin’:
plugin.c:340:14: internal compiler error: Segmentation fault
  340 | GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x11884b4 crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.c:325
0x7ffff6bc310f ???
       
/usr/src/debug/glibc-2.27-6.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x1fa1640 linemap_position_for_line_and_column(line_maps*, line_map_ordinary
const*, unsigned int, unsigned int)
        /home/marxin/Programming/gcc/libcpp/line-map.c:842
0x1f7c786 get_substring_ranges_for_loc
        /home/marxin/Programming/gcc/gcc/input.c:1472
0x1f7c903 get_source_location_for_substring(cpp_reader*, string_concat_db*,
unsigned int, cpp_ttype, int, int, int, unsigned int*)
        /home/marxin/Programming/gcc/gcc/input.c:1525
0x972881 c_get_substring_location(substring_loc const&, unsigned int*)
        /home/marxin/Programming/gcc/gcc/c-family/c-common.c:865
0x117dbdf substring_loc::get_location(unsigned int*) const
        /home/marxin/Programming/gcc/gcc/substring-locations.c:284
0x117d70b format_string_diagnostic_t::emit_warning_n_va(int, unsigned long,
char const*, char const*, __va_list_tag (*) [1]) const
        /home/marxin/Programming/gcc/gcc/substring-locations.c:156
0x117da15 format_string_diagnostic_t::emit_warning_va(int, char const*,
__va_list_tag (*) [1]) const
        /home/marxin/Programming/gcc/gcc/substring-locations.c:241
0x1d98d83 fmtwarn
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:472
0x1d9ddfc maybe_warn
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:2529
0x1d9eab3 format_directive
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:2817
0x1da0735 compute_format_length
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:3497
0x1da188a handle_gimple_call
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:3981
0x1da1a21 before_dom_children
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:4020
0x1d262e1 dom_walker::walk(basic_block_def*)
        /home/marxin/Programming/gcc/gcc/domwalk.c:353
0x1da1ac3 execute
        /home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:4046

Feel free to contact me with how to reproduce that.

Reply via email to