https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91963
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Wed, Oct 02, 2019 at 07:07:08AM -0700, Steve Kargl wrote: > On Wed, Oct 02, 2019 at 02:03:21PM +0000, kargl at gcc dot gnu.org wrote: > > --- Comment #3 from kargl at gcc dot gnu.org --- > > (In reply to Richard Biener from comment #1) > > > But is it valid fortran? > > > > Yes. It's valid. gfortran has poor handling of implied-do loops > > in initialization expression. > > > > Actually, the testcase submitted here in BZ is the > one of three posted in c.l.f that is invalid. C_BOOL > is the only interoperable type for ISO BIND C, so the > use of C_SIZEOF is invalid. > Here's valid code that shows the same problem use, intrinsic :: iso_fortran_env, only : logical_kinds integer :: i integer, parameter :: minkind = logical_kinds(minloc([( storage_size( & & a=[ logical(.false., logical_kinds(i))] ), & & i = 1, size(logical_kinds) )], dim=1)) print *, "logical_kinds = ", logical_kinds print *, "minkind = ", minkind end
