This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
>> * 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
- References:
- [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=
- Re: [Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=