https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125216
Bug ID: 125216
Summary: ICE: tree check, at gimple-match-6.cc:7833
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mario-baumann at web dot de
Target Milestone: ---
Created attachment 64390
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64390&action=edit
demo file to reproduce the bug
Hi all,
following Fortran file foo.F fails to compile with -O1 or higher, compilation
works fine with -O0.
> /opt/Gcc/17.0.0/bin/gfortran -m64 -ffixed-line-length-132 -O2 -c foo.F
during GIMPLE pass: forwprop
foo.F:1:7:
1 | SUBROUTINE FOO (NRI,RI)
| ^~~~~~~~~~~~~~
internal compiler error: tree check: expected boolean_type or enumeral_type or
integer_type or bitint_type, have real_type in gimple_simplify_629, at
gimple-match-6.cc:7833
/opt/Gcc/17.0.0/libexec/gcc/x86_64-apple-darwin21/17.0.0/f951 foo.F
-ffixed-form -cpp=/Users/mario/tmp/ccf2d36D.fi -quiet -D__DYNAMIC__ foo.F -fPIC
-quiet -dumpbase foo.F -dumpbase-ext .F -m64 -mmacosx-version-min=12.0.0
-mtune=core2 -O2 -ffixed-line-length-132 -fintrinsic-modules-path
/opt/Gcc/17.0.0/lib/gcc/x86_64-apple-darwin21/17.0.0/finclude -o
/Users/mario/tmp/cc41ybw5.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
---
> /opt/Gcc/17.0.0/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/Gcc/17.0.0/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/Gcc/17.0.0/libexec/gcc/x86_64-apple-darwin21/17.0.0/lto-wrapper
Target: x86_64-apple-darwin21
Configured with: /opt/Gcc/17.0.0/.src/configure --prefix=/opt/Gcc/17.0.0
--build=x86_64-apple-darwin21 --enable-languages=c,c++,fortran --enable-lto
--enable-stage1-checking --enable-libstdcxx-time --disable-nls
--disable-libquadmath --disable-libquadmath-support
--with-sysroot=/opt/Gcc/17.0.0/.sys --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-as=/opt/local/bin/as --with-system-zlib
--with-pkgversion=git-revision-228801
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260507 (experimental) (git-revision-228801)