This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]