https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125688
Bug ID: 125688
Summary: ice in gfc_conv_expr_val, at
fortran/trans-expr.cc:10779
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 64681
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64681&action=edit
f90 source code
For the attached source code, derived from code in the Fujitsu
test suite on github.com, recent gfortran does this:
foundBugs $ /home/dcb42/gcc/results.20260607.ubsan/bin/gfortran -c -w
bug1217.f90
so ok there, but
foundBugs $ /home/dcb42/gcc/results.20260609.ubsan/bin/gfortran -c -w
bug1217.f90bug1217.f90:49:3:
49 | end
| 1
internal compiler error: in gfc_conv_expr_val, at fortran/trans-expr.cc:10779
0x2033bd7 internal_error
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:787
Note no -O flags. For git hashes:
foundBugs $ /home/dcb42/gcc/results.20260607.ubsan/bin/gfortran -v 2>&1 | grep
exp
gcc version 17.0.0 20260604 (experimental) (cd33e5ad1945f19b)
foundBugs $ /home/dcb42/gcc/results.20260609.ubsan/bin/gfortran -v 2>&1 | grep
exp
gcc version 17.0.0 20260609 (experimental) (df3510f80e7c02d9)
foundBugs $
Also, the compiler runs on x86_64:
foundBugs $ /home/dcb42/gcc/results.20260609.ubsan/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/home/dcb42/gcc/results.20260609.ubsan/bin/gfortran
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.20260609.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.20260609.ubsan --disable-bootstrap
--disable-doc --disable-multilib --with-build-config=bootstrap-ubsan
--with-pkgversion=df3510f80e7c02d9 --enable-checking=yes
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260609 (experimental) (df3510f80e7c02d9)
foundBugs $