https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93834
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>: https://gcc.gnu.org/g:1b07d9dce6c51c98d011236c3d4cd84a2ed59ba2 commit r12-3866-g1b07d9dce6c51c98d011236c3d4cd84a2ed59ba2 Author: Tobias Burnus <tob...@codesourcery.com> Date: Thu Sep 23 18:47:45 2021 +0200 Fortran: Handle allocated() with coindexed scalars [PR93834] While for an allocatable 'array', 'array(:)' and 'array(:)[1]' are not allocatable, it is believed that not only 'scalar' but also 'scalar[1]' is allocatable. However, coarrays are collectively established/allocated; thus, 'allocated(scalar[i])' is equivalent to 'allocated(scalar)'. [At least when assuming that 'i' does not refer to a failed image.] 2021-09-23 Harald Anlauf <anl...@gmx.de> Tobias Burnus <tob...@codesourcery.com> PR fortran/93834 gcc/fortran/ChangeLog: * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle coindexed scalar coarrays. gcc/testsuite/ChangeLog: * gfortran.dg/coarray/coarray_allocated.f90: New test.