[Patch, fortran] PR20541 - allocatable components (TR15541)
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Oct 5 16:52:00 GMT 2006
Paul Thomas <paulthomas2@wanadoo.fr> wrote on Thu, 05 Oct 2006:
> This patch implements the part of TR15541 that is concerned with
> allocatable components of derived types. This extension to the F95
> standard offers three important advantages over pointer components:
>
> (i) Automatic deallocation of memory upon going out of scope;
> (ii)The automatic handling of allocation and copying of data in
> assignements of derived types with allocatable components; and
> (iii) Performance advantages through the automatic transfer of
> allocated resources.
This is probably the last bit needed to make gfortran entirely
competitive in the Fortran 95 compiler market. Congratulations!
Out of curiousity, why didn't you use alloca instead of doing all this
bookkeeping? Maybe because you would have needed bookkeeping anyway
for the case where the allocatable component would have been >
-fmax-stack-var-size? Or is there a simpler reason?
- Tobi
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Fortran
mailing list