This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] PR41582 allocate patch for CLASS


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


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