------- Comment #7 from sgk at troutmask dot apl dot washington dot edu 2006-10-29 20:02 ------- Subject: Re: ICE in gfc_assign_data_value_range
> Should we simply avoid the ice, perhaps accepting the invalid code or do we > want to search for duplicates in the DATA statements and generate an error? > > Also, > > Is this valid?: > > real :: a(5,5) > DATA a(1,1), a(3,1), a(1,2), a(3,3) /2*1.0, 2*2.0/ > DATA a(2,1) /2.5/ > > In other words, no overlap in the DATA statements. It is a big difference if > we have to search element by element. I suspect this is why this is not a > constraint on the compiler, but is a restriction on the programmer, so to > speak. > NAG compiles the following code: real :: a(5,5) DATA a(1,1), a(3,1), a(1,2), a(3,3) /2*1.0, 2*2.0/ DATA a(2,1) /2.5/ print *, a(1,1), a(3,1), a(1,2), a(3,3), a(2,1) end program and gives the expected output. If a(2,1) is changed to a(3,3), then NAG generates laptop:kargl[209] f95 -o z t.f90 Error: t.f90, line 3: Element no. 13 of object A already initialised Errors in declarations, no further processing for $main$ [f95 error termination] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24978