https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116412
Bug ID: 116412 Summary: [15 Regression] ICE on openblas-0.3.28: in find_lattice_value, at tree-complex.cc:178 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed an ICE today on openblas-0.3.28 when building with gcc-master r15-2990-gf11bc0884467c6. Minimized example: $ cat chbev_2stage.f SUBROUTINE CHBEV_2STAGE( AB, LDAB, W, Z, LDZ) REAL W( * ) COMPLEX AB( LDAB, * ), Z( LDZ, * ) LOGICAL LOWER IF( N.EQ.1 ) THEN IF( LOWER ) THEN W( 1 ) = ( AB( 1, 1 ) ) ELSE W( 1 ) = REAL( AB( 1, 1 ) ) END IF Z( 1, 1 ) = THEN END IF END Crashing: $ gfortran -O2 -Wall -c -o chbev_2stage.o chbev_2stage.f chbev_2stage.f:7:21: 7 | W( 1 ) = ( AB( 1, 1 ) ) | 1 Warning: Possible change of value in conversion from COMPLEX(4) to REAL(4) at (1) [-Wconversion] chbev_2stage.f:5:9: 5 | IF( N.EQ.1 ) THEN | ^ Warning: 'n' is used uninitialized [-Wuninitialized] chbev_2stage.f:5:11: 5 | IF( N.EQ.1 ) THEN | ^ note: 'n' was declared here during GIMPLE pass: cplxlower chbev_2stage.f:1:29: 1 | SUBROUTINE CHBEV_2STAGE( AB, LDAB, W, Z, LDZ) | ^ internal compiler error: in find_lattice_value, at tree-complex.cc:178 0x2064a3c diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x20711be internal_error(char const*, ...) ???:0 0x76d017 fancy_abort(char const*, int, char const*) ???:0 0x74932f complex_propagate::visit_phi(gphi*) [clone .cold] ???:0 0x10213f8 ssa_propagation_engine::simulate_stmt(gimple*) ???:0 0x10215ba ssa_propagation_engine::simulate_block(basic_block_def*) ???:0 0x1021a98 ssa_propagation_engine::ssa_propagate() ???:0 0xeb0be6 (anonymous namespace)::pass_lower_complex::execute(function*) ???:0 $ gfortran -v |& unnix Using built-in specs. COLLECT_GCC=/<<NIX>>/gfortran-15.0.0/bin/gfortran COLLECT_LTO_WRAPPER=/<<NIX>>/gfortran-15.0.0/libexec/gcc/x86_64-unknown-linux-gnu/15.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=/<<NIX>>/gfortran-15.0.0 --with-gmp-include=/<<NIX>>/gmp-6.3.0-dev/include --with-gmp-lib=/<<NIX>>/gmp-6.3.0/lib --with-mpfr-include=/<<NIX>>/mpfr-4.2.1-dev/include --with-mpfr-lib=/<<NIX>>/mpfr-4.2.1/lib --with-mpc=/<<NIX>>/libmpc-1.3.1 --with-native-system-header-dir=/<<NIX>>/glibc-2.39-52-dev/include --with-build-sysroot=/ --with-gxx-include-dir=/<<NIX>>/gfortran-15.0.0/include/c++/15.0.0/ --program-prefix= --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=release --enable-static --enable-languages=fortran --disable-multilib --enable-plugin --disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)