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

            Bug ID: 124743
           Summary: ICE on valid code at -O3 with
                    "-fno-tree-loop-distribute-patterns
                    -fno-tree-loop-distribution -fno-tree-ccp
                    -fno-tree-copy-prop -fno-tree-dse" on
                    x86_64-linux-gnu: verify_ssa failed
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

Note:
- fails: trunk
- works: 15.2 and earlier
- very recent as it doesn't fail with the latest Compiler Explorer build

[595] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.1 20260401 (experimental) (GCC)
[596] %
[596] % gcctk -O3 -fno-tree-loop-distribute-patterns
-fno-tree-loop-distribution -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dse
small.c
small.c: In function ‘main’:
small.c:4:5: error: definition in block 3 follows the use
    4 | int main() {
      |     ^~~~
for SSA_NAME: vect__12.24_42 in statement:
vect__6.25_43 = vect__12.24_42 >> d.3_1;
during GIMPLE pass: vect
small.c:4:5: internal compiler error: verify_ssa failed
0x25dabab internal_error(char const*, ...)
        ../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x147fdca verify_ssa(bool, bool)
        ../../gcc-trunk/gcc/tree-ssa.cc:1203
0x10a54e4 execute_function_todo
        ../../gcc-trunk/gcc/passes.cc:2107
0x10a5c1b execute_todo
        ../../gcc-trunk/gcc/passes.cc:2152
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/cc1
-quiet -I /usr/local/include -I /local/suz-local/software/local/include
-imultiarch x86_64-linux-gnu -iprefix
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../lib/gcc/x86_64-pc-linux-gnu/16.0.1/
small.c -quiet -dumpdir a- -dumpbase small.c -dumpbase-ext .c -mtune=generic
-march=x86-64 -O3 -fno-tree-loop-distribute-patterns
-fno-tree-loop-distribution -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dse -o
/tmp/cckSw8Oc.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[597] %
[597] % cat small.c
int a, b, c, d;
int e(int f, int g) { return g < 0 || g > 1 ? 0 : f >> g; }
int h(int i) { return a > 1 ? 0 : i << a; }
int main() {
  for (; b; b++)
    c = e(h(1), d);
  return 0;
}

Reply via email to