diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2025-03-21 09:13:29 +0100 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2025-03-21 13:31:55 +0100 |
commit | a5c69abf1384ec6163cd5e14146e8b3876e8b95c (patch) | |
tree | 4725f107c7547888a671fe0ad1e9a0c1728fe3b1 /gcc/fortran | |
parent | adbbf12a8f86ecb5c288302069f929d85c6b45ad (diff) | |
download | gcc-a5c69abf1384ec6163cd5e14146e8b3876e8b95c.zip gcc-a5c69abf1384ec6163cd5e14146e8b3876e8b95c.tar.gz gcc-a5c69abf1384ec6163cd5e14146e8b3876e8b95c.tar.bz2 |
Fortran: Fix freeing procedure pointer components [PR119380]
PR fortran/119380
gcc/fortran/ChangeLog:
* trans-array.cc (structure_alloc_comps): Prevent freeing of
procedure pointer components.
gcc/testsuite/ChangeLog:
* gfortran.dg/proc_ptr_comp_54.f90: New test.
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/trans-array.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index e9eacf2..9606131 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -10109,7 +10109,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, tree dest, else { attr = &c->attr; - if (attr->pointer) + if (attr->pointer || attr->proc_pointer) continue; } |