[Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=

Janus Weil janus@gcc.gnu.org
Sun Jun 13 18:16:00 GMT 2010


>> * The following does not compile although it does not violate C633:
>>
>> integer, allocatable :: a(:), b(:)
>> allocate (a, source = b)
>
> What's the error message (my gfortran is currently building)?

allocate (a, source = b)
          1
Error: Array specification required in ALLOCATE statement at (1)


> Technically, the above is invalid because b is undefined.

The following variant even gives an ICE (using trunk+my patch, but
also with 4.5):

integer, allocatable :: a(:)
integer :: b(1:3)
allocate (a, source = b)
end


Cheers,
Janus



More information about the Gcc-patches mailing list