diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2023-09-28 09:30:12 +0200 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2023-09-29 14:54:42 +0200 |
commit | a680274616ec6b26ccfdcee400ed7f54e341d40c (patch) | |
tree | 879c2beab585e70d2e145901c0be725767703642 /gcc/function.h | |
parent | 574cec45b2674a2d575a06fc8e73851f9af4bb4c (diff) | |
download | gcc-a680274616ec6b26ccfdcee400ed7f54e341d40c.zip gcc-a680274616ec6b26ccfdcee400ed7f54e341d40c.tar.gz gcc-a680274616ec6b26ccfdcee400ed7f54e341d40c.tar.bz2 |
Fortran: Free alloc. comp. in allocated coarrays only.
When freeing allocatable components of an allocatable coarray, add
a check that the coarray is still allocated, before accessing the
components.
This patch adds to PR fortran/37336, but does not fix it completely.
gcc/fortran/ChangeLog:
PR fortran/37336
* trans-array.cc (structure_alloc_comps): Deref coarray.
(gfc_trans_deferred_array): Add freeing of components after
check for allocated coarray.
gcc/testsuite/ChangeLog:
PR fortran/37336
* gfortran.dg/coarray/alloc_comp_6.f90: New test.
* gfortran.dg/coarray/alloc_comp_7.f90: New test.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions