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 41872 - Fixes for allocatable scalars (part 1)


Tobias Burnus wrote:
Hello,

allocatable scalars have several issues. This patch fixes the some of
them. (For more issues, see PR.)

Especially the following now works:

* Passing allocatable scalars as argument. The problem before was that
the allocatable scalar was passed by value and not by reference.

* Auto-deallocation of allocatable actual arguments when passing them to
allocatable INTENT(OUT) dummies.

* Going out of scope does no longer nullify the variable; this is not
needed as the variable cannot be accessed. (missed optimization)

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

Ok. Thanks for the patch!


I'm just wondering if that "large" new code block for deallocating allocatable scalars passed to INTENT(OUT) can't be somehow be simplified -- actually, there should already be code to do this for non-scalar allocatables; is it possible to merge this somehow? But I guess it's not, because stuff is probably too different there.

Yours,
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]