From f82f425b56a1ccf1950c6d0992e7c106558acba0 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Sun, 20 May 2018 10:04:46 +0000 Subject: re PR fortran/49636 ([F03] ASSOCIATE construct confused with slightly complicated case) 2018-05-20 Paul Thomas PR fortran/49636 * trans-array.c (gfc_get_array_span): Renamed from 'get_array_span'. (gfc_conv_expr_descriptor): Change references to above. * trans-array.h : Add prototype for 'gfc_get_array_span'. * trans-stmt.c (trans_associate_var): If the associate name is a subref array pointer, use gfc_get_array_span for the span. 2018-05-20 Paul Thomas PR fortran/49636 * gfortran.dg/associate_38.f90: New test. From-SVN: r260414 --- gcc/fortran/trans-array.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/fortran/trans-array.c') diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index cf4b23f..7e6cea1 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -817,8 +817,8 @@ is_pointer_array (tree expr) /* Return the span of an array. */ -static tree -get_array_span (tree desc, gfc_expr *expr) +tree +gfc_get_array_span (tree desc, gfc_expr *expr) { tree tmp; @@ -7061,7 +7061,7 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr) subref_array_target, expr); /* ....and set the span field. */ - tmp = get_array_span (desc, expr); + tmp = gfc_get_array_span (desc, expr); gfc_conv_descriptor_span_set (&se->pre, se->expr, tmp); } else if (se->want_pointer) @@ -7334,7 +7334,7 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr) parmtype = TREE_TYPE (parm); /* ....and set the span field. */ - tmp = get_array_span (desc, expr); + tmp = gfc_get_array_span (desc, expr); gfc_conv_descriptor_span_set (&loop.pre, parm, tmp); } else -- cgit v1.1