[Patch, Fortran] PR 42647: Missed initialization/dealloc of allocatable scalar DT with allocatable component

Tobias Burnus burnus@net-b.de
Thu Oct 14 14:21:00 GMT 2010


  On 10/14/2010 09:53 AM, Salvatore Filippone wrote:
> Tobias Burnus wrote:
>> a) allocate(a1, a1%b1, a1%b1%c1)
> "The Fortran 2003 Handbook" at section 6.7.1 states, on restriction 12:
> "An allocate object [...] must not depend [....]
> on the [...] allocation status [...] of any allocatable object in the same ALLOCATE
> statement".
>
> Thus the code is invalid.

I concur and - as I wrote in PR 42647 the same words (or nearly the 
same) are in first paragraph after F2008's C644.


> Should this be recognized as a standard violation? I can imagine the
> above to be relatively easy, while the general case might be arbitrarily
> complicated.

I am not sure how common it is - but I have now filled PR 46017 as 
enhancement diagnostics PR.

Tobias



More information about the Fortran mailing list