[Bug c/126876] New: [17 regression] ice in ssa_range_in_phi

dcb314 at hotmail dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126876

            Bug ID: 126876
           Summary: [17 regression] ice in ssa_range_in_phi
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 65335
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65335&action=edit
C source code

The attached code does this with recent gcc trunk:

$ ../results/bin/gcc -c -O2 -w bug1235.c
during GIMPLE pass: thread
/home/dcb42/rpmbuild/BUILD/ktextaddons-2.1.0-build/ktextaddons-2.1.0/textutils/cmark-rc/blocks.c:
In function ‘S_parser_feed’:
/home/dcb42/rpmbuild/BUILD/ktextaddons-2.1.0-build/ktextaddons-2.1.0/textutils/cmark-rc/blocks.c:635:13:
internal compiler error: Segmentation fault
  635 | static void S_parser_feed(cmark_parser *parser, const unsigned char
*buffer, size_t len, bool eof)
      |             ^~~~~~~~~~~~~
0x21ad017 internal_error
       
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:787
0xc91c49 ???
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/toplev.cc:325
0xea62b7 ssa_range_in_phi
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/gimple-range-path.cc:262
0xea5d8c range_defined_in_block
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/gimple-range-path.cc:303
0xea5bbb internal_range_of_expr
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/gimple-range-path.cc:160

The bug first seems to occur sometime between g:424bd64ef45e001c
and g:736361789c1309e3

Compiler is

$ ../results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=../results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.20260814.ubsan/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure
--prefix=/home/dcb42/gcc/results.20260814.ubsan --disable-bootstrap
--disable-doc --disable-multilib --with-build-config=bootstrap-ubsan
--with-pkgversion=736361789c1309e3 --enable-checking=yes
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260814 (experimental) (736361789c1309e3) 
$
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.