summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorvehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-04 09:32:28 +0000
committervehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-04 09:32:28 +0000
commit89d4ebfaa1bd069b235d0b4d8d381949eeb24dd0 (patch)
tree0359da9c7ee2fde9145b6988e87491fb19e9ceb8 /gcc/fortran/trans-array.c
parent68ab33a64de503faa184baae68577be517e214b1 (diff)
gcc/fortran/ChangeLog:
2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/65795 * trans-array.c (gfc_array_allocate): When the array is a coarray, do not nullyfing its allocatable components in array_allocate, because the nullify missed the array ref and nullifies the wrong component. Cosmetics. gcc/testsuite/ChangeLog: 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/65795 * gfortran.dg/coarray_allocate_6.f08: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234710 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 649b80fec847..825dfb822af5 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -5550,8 +5550,8 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg,
else
gfc_add_expr_to_block (&se->pre, set_descriptor);
- if ((expr->ts.type == BT_DERIVED)
- && expr->ts.u.derived->attr.alloc_comp)
+ if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->attr.alloc_comp
+ && !coarray)
{
tmp = gfc_nullify_alloc_comp (expr->ts.u.derived, se->expr,
ref->u.ar.as->rank);