From a5c69abf1384ec6163cd5e14146e8b3876e8b95c Mon Sep 17 00:00:00 2001 From: Andre Vehreschild Date: Fri, 21 Mar 2025 09:13:29 +0100 Subject: 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. --- gcc/fortran/trans-array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran') 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; } -- cgit v1.1