[PATCH, Fortran, v3] Fix deallocation of nested derived typed components
Andre Vehreschild
vehre@gmx.de
Mon Dec 5 13:32:00 GMT 2016
Hi Dominique, hi all,
@Dominique: Thanks for testing. I have extended my usual testcycle to add the
libgomp.fortran tests.
I could fix the errors below by calling deallocate_with_status directly from
the trans_omp_*-routines instead of using the gfc_array_deallocate wrapper.
While being at it, I made deallocate_with_status almighty when freeing memory.
gfc_deallocate_with_status now frees memory of scalars or arrays, coarrayed
scalars or coarrayed arrays without having to massage the inputs of the
routine. The benefit of this is, that instead of having four routines that are
able to deallocate a special kind of allocated object, there now are only two
(gfc_deallocate_scalar_with_status can be removed, too, but means changes in
many places which would enlarge this patch even more. Therefore I have not yet
done it.). I.e. no longer guessing which routine to call for freeing an
allocatable object -> hand it to deallocate_with_status and be done.
Bootstraps and regtests ok on x86_64-linux/F23. Ok for trunk?
Regards,
Andre
On Sun, 4 Dec 2016 00:59:00 +0100
Dominique d'Humières <dominiq@lps.ens.fr> wrote:
> Hi Andre,
>
> I fear the patch is causing another set of failures with -fopenmp:
>
> FAIL: libgomp.fortran/allocatable11.f90 -O0 (internal compiler error)
> …
> FAIL: libgomp.fortran/allocatable8.f90 -g -flto (test for excess errors)
>
> of the kind
>
> collect2: error: ld returned 1 exit status
> [Book15] f90/bug%
> gfc /opt/gcc/work/libgomp/testsuite/libgomp.fortran/allocatable2.f90
> -fopenmp /opt/gcc/work/libgomp/testsuite/libgomp.fortran/allocatable2.f90:46:0:
>
> if (l.or.allocated (a)) call abort
>
> Error: incorrect sharing of tree nodes
> a.data
> a.data = 0B;
> /opt/gcc/work/libgomp/testsuite/libgomp.fortran/allocatable2.f90:46:0:
> internal compiler error: verify_gimple failed
>
> Dominique
>
> > Le 3 déc. 2016 à 19:51, Andre Vehreschild <vehre@gmx.de> a écrit :
> >
> > Hi all,
> >
> > @Dominique: Thanks for checking. And also for pointing out that the initial
> > version of the patch ICEd on some already closed PRs. The objective of those
> > PRs does not seem to be covered by the current testsuite. I therefore
> > additionally propose to add attached testcase. Ok for trunk?
> >
> > Of course with appropriate Changelog-entry.
> >
> > Regards,
> > Andre
>
--
Andre Vehreschild * Email: vehre ad gmx dot de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dealloc_comps_fix_v3.clog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161205/9f8d5607/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dealloc_comps_fix_v3.patch
Type: text/x-patch
Size: 34990 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161205/9f8d5607/attachment.bin>
More information about the Fortran
mailing list