gfortran fails to compile valid code

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Nov 21 23:56:00 GMT 2005


On Mon, Nov 21, 2005 at 03:44:26PM -0800, Uttam Pawar wrote:
> Hi All,
> 
> gfortran fails to compile following valid code,
> 
> $ cat test.f90
>        integer         :: j, k
>        integer, parameter :: l=5, l2=((l+1)/2)**2
>        real               :: a(l,l)
>        data ((a(j,k), k=1,j),j=1,l,2) / l2 * 1.0 /
>        end
> 
> $ gfortran test.f90
> 
>        data ((a(j,k), k=1,j),j=1,l,2) / 12 * 1.0 /
>   
> Error: Variable 'j' at (1) cannot appear in an initialization expression
> 
> Any thoughts?
> 

PR 23232

-- 
Steve



More information about the Fortran mailing list