diff options
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 123df5d..3ac6523 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -8647,8 +8647,8 @@ gfc_trans_deferred_array (gfc_symbol * sym, gfc_wrapped_block * block) type = TREE_TYPE (descriptor); } - /* NULLIFY the data pointer. */ - if (GFC_DESCRIPTOR_TYPE_P (type) && !sym->attr.save) + /* NULLIFY the data pointer, for non-saved allocatables. */ + if (GFC_DESCRIPTOR_TYPE_P (type) && !sym->attr.save && sym->attr.allocatable) gfc_conv_descriptor_data_set (&init, descriptor, null_pointer_node); gfc_restore_backend_locus (&loc); |