On Tue, Nov 22, 2022 at 10:15:39PM +0100, Harald Anlauf via Fortran wrote: > Minor addition: > > program foo > implicit none > real(8) :: i > integer, parameter :: q(*) = [(kind(i), integer :: i = 1, 3)] > print *, q > end program foo > > This prints > > 8 8 8 > > although it should be all 4's. So we really need to create a local > namespace or even block to shadow the host's variable. > > Crayftn and NAG accept this too, Intel has a problem report on this. >
I'll see if I can make the shadow variable idea work. For two lines integer, parameter :: q(3) = [(kind(i), integer :: i = 1, 3)] integer :: p(3) = [(kind(i), integer :: i = 1, 3)] I believe the paths through the compiler differ sufficiently, and the shado variable might help in keeping the change simple. -- Steve