This is the mail archive of the
mailing list for the GCC project.
Re: [Patch,Fortran] PR41582 allocate patch for CLASS
- From: Daniel Kraft <d at domob dot eu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 09 Oct 2009 21:36:28 +0200
- Subject: Re: [Patch,Fortran] PR41582 allocate patch for CLASS
- References: <20091009171151.GA25954@net-b.de>
Tobias Burnus wrote:
this patch implements
a) A constraint for ALLOCATE (class with abstract base type):
"C625 (R623) If any allocate-object is unlimited polymorphic or
is of abstract type, either type-spec or SOURCE= shall appear."
(If you miss "abstract type" in your copy of the standard, you
do not have read Corrigendum 1.)
b) Reject "allocate(..., SOURCE=<class>)". To make it work, one
needs to know the size at run time, which does not work yet. I
think it makes sense to reject it rather than to use the size of
the base type and only to warn about it.
(This is probably the most important missing feature in gfortran's
I agree with your point.
Build and regtested on x86-64-linux.
OK for the trunk?
To go: Hea-Kni-Mon-Pri