diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2018-05-20 10:04:46 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2018-05-20 10:04:46 +0000 |
commit | f82f425b56a1ccf1950c6d0992e7c106558acba0 (patch) | |
tree | 1979e22abd5e448cee201ee6e3e3f4b88d8e102f /gcc/fortran/trans-array.c | |
parent | 7c71e79664fbc04c3eb1d8b0307b33e502488664 (diff) | |
download | gcc-f82f425b56a1ccf1950c6d0992e7c106558acba0.zip gcc-f82f425b56a1ccf1950c6d0992e7c106558acba0.tar.gz gcc-f82f425b56a1ccf1950c6d0992e7c106558acba0.tar.bz2 |
re PR fortran/49636 ([F03] ASSOCIATE construct confused with slightly complicated case)
2018-05-20 Paul Thomas <pault@gcc.gnu.org>
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 <pault@gcc.gnu.org>
PR fortran/49636
* gfortran.dg/associate_38.f90: New test.
From-SVN: r260414
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 |