diff options
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 6e24e2e..71e0482 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -8074,7 +8074,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, } if (cmp_has_alloc_comps - && !c->attr.pointer + && !c->attr.pointer && !c->attr.proc_pointer && !called_dealloc_with_status) { /* Do not deallocate the components of ultimate pointer @@ -8264,7 +8264,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, components that are really allocated, the deep copy code has to be generated first and then added to the if-block in gfc_duplicate_allocatable (). */ - if (cmp_has_alloc_comps) + if (cmp_has_alloc_comps + && !c->attr.proc_pointer) { rank = c->as ? c->as->rank : 0; tmp = fold_convert (TREE_TYPE (dcmp), comp); |