summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorvehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-30 10:20:59 +0000
committervehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-30 10:20:59 +0000
commite0e00cf46e3492a09cfd2b130ebe1527657711a3 (patch)
tree2a9fff47c877e59328ae314ee6f4aa5be68ce12a /gcc/fortran/trans-array.c
parent4421152646cd396dc6548f32190320f997e29ca8 (diff)
gcc/fortran/ChangeLog:
2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org> * trans-array.c (gfc_array_allocate): Use the token from coarray's .token member. * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate caf-reference chains from the first coarray references on. * trans-types.c (gfc_get_derived_type): Switch on mandatory .token member generation for allocatable arrays in coarrays in derived types. gcc/testsuite/ChangeLog: 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org> * gfortran.dg/coarray_allocate_10.f08: New test. * gfortran.dg/coindexed_1.f90: Above fixes allow execution. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 0b9776009400..50312fed3074 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -5406,7 +5406,6 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg,
gfc_expr **lower;
gfc_expr **upper;
gfc_ref *ref, *prev_ref = NULL, *coref;
- gfc_se caf_se;
bool allocatable, coarray, dimension, alloc_w_e3_arr_spec = false;
ref = expr->ref;
@@ -5531,7 +5530,6 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg,
}
}
- gfc_init_se (&caf_se, NULL);
gfc_start_block (&elseblock);
/* Allocate memory to store the data. */
@@ -5543,9 +5541,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg,
if (coarray && flag_coarray == GFC_FCOARRAY_LIB)
{
- tmp = gfc_get_tree_for_caf_expr (expr);
- gfc_get_caf_token_offset (&caf_se, &token, NULL, tmp, NULL_TREE, expr);
- gfc_add_block_to_block (&elseblock, &caf_se.pre);
+ token = gfc_conv_descriptor_token (se->expr);
token = gfc_build_addr_expr (NULL_TREE, token);
}
@@ -5557,7 +5553,6 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg,
else
gfc_allocate_using_malloc (&elseblock, pointer, size, status);
- gfc_add_block_to_block (&elseblock, &caf_se.post);
if (dimension)
{
cond = gfc_unlikely (fold_build2_loc (input_location, NE_EXPR,