This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 41872 - Fixes for allocatable scalars (part 1)
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Kraft <d at domob dot eu>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sun, 01 Nov 2009 18:51:31 +0100
- Subject: Re: [Patch, Fortran] PR 41872 - Fixes for allocatable scalars (part 1)
- References: <4AEDB241.7030401@net-b.de> <4AEDB6E3.2010105@domob.eu>
Daniel Kraft wrote:
> Tobias Burnus wrote:
>> allocatable scalars have several issues. This patch fixes the some of
>> them. [...]
> 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.
Committed as Rev. 153795. Thanks for the review. I think it is not easy
to simplify the code: Large parts are the same both there are enough
differences that one only trades one kind of ifs with another one.
I think the proper way would be to rewrite some of the allocatable
handling stuff. One might consider this for 4.6 if GCC gets a new array
descriptor. Actually, I do not like that the caller and not the callee
deallocates intent(OUT) variables. I wonder how this should work with
BIND(C) and the new TR 29113.
Tobias