[Patch,Fortran] PR41582 allocate patch for CLASS

Daniel Kraft d@domob.eu
Fri Oct 9 19:35:00 GMT 2009


Tobias Burnus wrote:
> Hello,
> 
> 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
>  OOP implementation.)

I agree with your point.

> Build and regtested on x86-64-linux.
> OK for the trunk?

Ok.

Thanks!
Daniel

-- 
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri



More information about the Fortran mailing list