From 49b804d0ea34e091ad19dfbb4d3d04c7a0112f0e Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Tue, 18 Oct 2011 15:13:45 +0000 Subject: re PR fortran/50420 ([Coarray] lcobound doesn't accept coarray subcomponents) PR fortran/50420 * trans-types.c (gfc_build_array_type): Don't force lower bound to one in the deferred case. From-SVN: r180151 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-types.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2421c03..f8105b1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,6 +1,12 @@ 2011-10-18 Mikael Morin PR fortran/50420 + * trans-types.c (gfc_build_array_type): Don't force lower bound to one + in the deferred case. + +2011-10-18 Mikael Morin + + PR fortran/50420 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays. Don't set already set array ref. diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 4c5990e..cb5f30e 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1254,7 +1254,7 @@ gfc_build_array_type (tree type, gfc_array_spec * as, for (n = as->rank; n < as->rank + as->corank; n++) { - if (as->lower[n] == NULL) + if (as->type != AS_DEFERRED && as->lower[n] == NULL) lbound[n] = gfc_index_one_node; else lbound[n] = gfc_conv_array_bound (as->lower[n]); -- cgit v1.1