On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > F2008 introduced the inclusion of a typespec in a forall > statement, and thn F2018 a typespec was allowed in an > implied-do. There may even be a few bug reports. >
Forgot to ask. Anyone know how namespaces work with initialization expressions in gfortran? This code should compile program foo use iso_fortran_env, only : k => real_kinds implicit none integer, parameter :: n = size(k) integer, parameter :: & & p(n) = [(precision(real(1.,k(i))), integer :: i = 1, n)] print '(*(I0,X))', p end program foo The first occurence of 'i' in the expression for 'p(n)' is either thought to be in a different namespace, or an implied-do loop cannot be used in an initialization expression. -- Steve