https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129152
Bug ID: 129152
Summary: ice in gfc_add_modify_loc, at fortran/trans.cc:237
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 66338
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66338&action=edit
f90 source code
>From the llvm flang testsuite on github, flang is happy with the
following file:
$ flang -c -w
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-proc-pointer-assignment-scheduling-character.f90
$
gfortran 16.2.0 isn't so happy with it:
$ ~/gcc/results.16.2.0/bin/gfortran -c -w
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-proc-pointer-assignment-scheduling-character.f90
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-proc-pointer-assignment-scheduling-character.f90:77:68:
77 | forall(i=1:10) x(decode(x(11-i)%p()))%p => x(modulo(-2*i, 11))%p
| 1
internal compiler error: in gfc_add_modify_loc, at fortran/trans.cc:232
^C
$
gfortran 16.2.0 is
$ ~/gcc/results.16.2.0/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/home/dcb42/gcc/results.16.2.0/bin/gfortran
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.16.2.0/libexec/gcc/x86_64-pc-linux-gnu/16.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-16.2.0/configure
--prefix=/home/dcb42/gcc/results.16.2.0 --disable-bootstrap --disable-doc
--disable-multilib --with-pkgversion=16.2.0 --enable-checking=yes
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.2.0 (16.2.0)
$
gfortran current trunk acts similarly.
Source code attached.