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

--- Comment #5 from anlauf at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #4)
> (In reply to Andre Vehreschild from comment #3)
> > Will backport to gcc-15 in about a week.
> 
> I am still getting a failure on trunk. Something is lurking here, I did a
> complete rebuild in an empty build directory.
> 
> $ gfc -v
> Using built-in specs.
> COLLECT_GCC=gfc
> COLLECT_LTO_WRAPPER=/home/jerry/dev/usr/libexec/gcc/x86_64-pc-linux-gnu/16.0.
> 0/lto-wrapper
> Target: x86_64-pc-linux-gnu
> Configured with: ../trunk/configure --prefix=/home/jerry/dev/usr
> --enable-languages=c,c++,fortran --enable-libgomp --disable-bootstrap
> Thread model: posix
> Supported LTO compression algorithms: zlib zstd
> gcc version 16.0.0 20250701 (experimental) (GCC) 
> 
> I am using Fedora 42 here.
> 
> $ gfc -fcoarray=single random-weather.f90 
> f951: internal compiler error: in gfc_ref_this_image, at fortran/expr.cc:5948
> 0x21dce1f internal_error(char const*, ...)
>       ../../trunk/gcc/diagnostic-global-context.cc:517
> 0x647e93 fancy_abort(char const*, int, char const*)
>       ../../trunk/gcc/diagnostic.cc:1810
> 0x40369d gfc_ref_this_image(gfc_ref*)
>       ../../trunk/gcc/fortran/expr.cc:5948
> 0x40369d gfc_ref_this_image(gfc_ref*)
>       ../../trunk/gcc/fortran/expr.cc:5944
> 0x730068 resolve_operator
> 
> Is this a seprate bug. gfortran 14 compiles this fine.

Looks like you're hitting the assert:

  gcc_assert (ref->type == REF_ARRAY && ref->u.ar.codimen > 0);

Can you produce a smaller testcase?

Reply via email to