From 957a1b14e99596610abb0777ca86a1c80dde24e0 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Sun, 1 Mar 2020 16:15:28 +0000 Subject: Patch and ChangeLogs for PR92976 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/match.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 39786ec..1256b95 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2020-03-01 Paul Thomas + PR fortran/92976 + * match.c (select_type_set_tmp): If the selector array spec has + explicit bounds, make the temporary's bounds deferred. + +2020-03-01 Paul Thomas + PR fortran/92959 * trans-intrinsic.c (gfc_conv_associated): Eliminate 'nonzero_charlen' and move the chunk to evaluate zero character diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 17196eb..753a5f1 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -6327,8 +6327,14 @@ select_type_set_tmp (gfc_typespec *ts) = CLASS_DATA (selector)->attr.dimension; sym->attr.codimension = CLASS_DATA (selector)->attr.codimension; - sym->as - = gfc_copy_array_spec (CLASS_DATA (selector)->as); + if (CLASS_DATA (selector)->as->type != AS_EXPLICIT) + sym->as = gfc_copy_array_spec (CLASS_DATA (selector)->as); + else + { + sym->as = gfc_get_array_spec(); + sym->as->rank = CLASS_DATA (selector)->as->rank; + sym->as->type = AS_DEFERRED; + } } } -- cgit v1.1