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

            Bug ID: 122773
           Summary: ice in  collect_fallthrough_labels, at
                    gimplify.cc:2694
           Product: gcc
           Version: 16.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 62856
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62856&action=edit
gzipped C source code

For the attached C code, compiled as follows by recent gcc,
does this:

foundBugs$ ../results/bin/gcc -Wall -Wextra -O1 -march=native
-ftrivial-auto-var-init=zero  -c bug1141.c
/home/dcb42/rpmbuild/BUILD/hyperscan-5.4.1-build/hyperscan-5.4.1/src/rose/program_runtime.
c: In function ‘roseRunProgram’:
/home/dcb42/rpmbuild/BUILD/hyperscan-5.4.1-build/hyperscan-5.4.1/src/rose/program_runtime.
c:2585:17: internal compiler error: tree check: expected label_decl, have
ssa_name in collect_fallthrough_labels, at gimplify.cc:2694
 2585 |                 switch (rv) {
      |                 ^~~~~~
0x1f973d7 internal_error
       
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:787
0x101a52f tree_check_failed
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/tree.cc:9189
0x8a6292 warn_implicit_fallthrough_r
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/gimplify.cc:0

Native is znver3, but replacing native by znver3 causes many errors.
I don't know why.

The bug seems to exist since before g:200b826af41d0dc0.

The compiler version I used:

foundBugs $ ../results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=../results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.20251119.asan.ubsan/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure
--prefix=/home/dcb42/gcc/results.20251119.asan.ubsan --disable-bootstrap
--disable-doc --disable-multilib --with-build-config='bootstrap-asan
bootstrap-ubsan' --with-pkgversion=e2faea35a1edf6fc --with-isl
--enable-checking=df,extra,fold,rtl,yes --enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251119 (experimental) (e2faea35a1edf6fc) 
foundBugs $

Reply via email to