summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorvehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-27 17:34:11 +0000
committervehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-27 17:34:11 +0000
commit128078ac77a1171c1219110369904c7a90fa5f2c (patch)
tree8a4260da5d8939c246372d739e6e13568877622d /gcc/fortran/trans-openmp.c
parent08cb962fa19224ab6e256a5c163c0584e21cf014 (diff)
downloadgcc-128078ac77a1171c1219110369904c7a90fa5f2c.tar.gz
gcc/fortran
2015-04-27 Andre Vehreschild <vehre@gmx.de> PR fortran/59678 PR fortran/65841 * trans-array.c (duplicate_allocatable): Fixed deep copy of allocatable components, which are liable for copy only, when they are allocated. (gfc_duplicate_allocatable): Add deep-copy code into if component allocated block. Needed interface change for that. (gfc_copy_allocatable_data): Supplying NULL_TREE for code to add into if-block for checking whether a component was allocated. (gfc_duplicate_allocatable_nocopy): Likewise. (structure_alloc_comps): Likewise. * trans-array.h: Likewise. * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise. * trans-openmp.c (gfc_walk_alloc_comps): Likewise. gcc/testsuite 2015-04-27 Andre Vehreschild <vehre@gmx.de> PR fortran/59678 PR fortran/65841 * gfortran.dg/alloc_comp_deep_copy_1.f03: New test. * gfortran.dg/alloc_comp_deep_copy_2.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r--gcc/fortran/trans-openmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 9642a7d6b29..dd19a9cec21 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -391,9 +391,11 @@ gfc_walk_alloc_comps (tree decl, tree dest, tree var,
if (GFC_DESCRIPTOR_TYPE_P (ftype)
&& GFC_TYPE_ARRAY_AKIND (ftype) == GFC_ARRAY_ALLOCATABLE)
tem = gfc_duplicate_allocatable (destf, declf, ftype,
- GFC_TYPE_ARRAY_RANK (ftype));
+ GFC_TYPE_ARRAY_RANK (ftype),
+ NULL_TREE);
else if (GFC_DECL_GET_SCALAR_ALLOCATABLE (field))
- tem = gfc_duplicate_allocatable (destf, declf, ftype, 0);
+ tem = gfc_duplicate_allocatable (destf, declf, ftype, 0,
+ NULL_TREE);
break;
}
if (tem)