From ee3bb1b7a2f73c9ccc99b0861e8a3408d408ca2d Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 14 Feb 2018 22:46:59 +0100 Subject: re PR fortran/84385 ([F03] Reject invalid SELECT TYPE selector (allocate_with_source_22.f03)) 2018-02-14 Janus Weil PR fortran/84385 * match.c (gfc_match_select_type): Fix check for selector in SELECT TYPE statement. 2018-02-14 Janus Weil PR fortran/84385 * gfortran.dg/allocate_with_source_22.f03: Fix invalid test case. * gfortran.dg/allocate_with_source_23.f90: Ditto. * gfortran.dg/select_type_1.f03: Extend test case. From-SVN: r257673 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/match.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 01e2a90..ed91bf7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2018-02-14 Janus Weil + + PR fortran/84385 + * match.c (gfc_match_select_type): Fix check for selector in + SELECT TYPE statement. + 2018-02-13 Janus Weil PR fortran/84313 diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 9313f43..8f3a027 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -6201,9 +6201,10 @@ gfc_match_select_type (void) || CLASS_DATA (expr1)->attr.codimension) && expr1->ref && expr1->ref->type == REF_ARRAY + && expr1->ref->u.ar.type == AR_FULL && expr1->ref->next == NULL); - /* Check for F03:C811. */ + /* Check for F03:C811 (F08:C835). */ if (!expr2 && (expr1->expr_type != EXPR_VARIABLE || (!class_array && expr1->ref != NULL))) { -- cgit v1.1