[Patch,Fortran] PRs 45451 / 43018: Fixes for allocatables

Janus Weil janus@gcc.gnu.org
Tue Oct 26 07:57:00 GMT 2010


Hi Tobias,

> this patch fixes two things:
>
> a) PR 43018: For duplicate_allocatable the size was wrong: gfortran used for
> scalars the size of the pointer and not the size of the type.
> I have not added a test case as it was found via the valgrind error of
> gfortran.de/alloc_comp_scalar_1.f90; the test case also fails one one system
> (s390?).
>
> b) PR 45451: If one does an ALLOCATE with SOURCE=, one needs to do a deep
> copy if there are allocatable components.
> Without the non-variable case, it fails for the first ALLOCATE statement in
> gfortran.dg/allocate_alloc_opt_10.f90, where the source is an
> EXPR_STRUCTURE.
>
> Build an regtested on x86-64-linux.
> OK for the trunk?

I think the patch is ok. Thanks for taking care of this.


> PS: This patch does not fix all problems with PR 45451.

You mean comment #8/9?

Cheers,
Janus



More information about the Fortran mailing list