diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 13 |
2 files changed, 12 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 272a94e..ef7e941 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,10 +1,15 @@ +2018-06-03 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/36497 + * decl.c (variable_decl): Use gfc_add_type for cray pointees. + 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/63570 * check.c (gfc_check_random_init): New function. Check arguments of RANDOM_INIT. * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token. - * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of + * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of subroutines. (gfc_check_intrinsic_standard): Introduce Fortran 2018 check. * intrinsic.h: Add prototypes for gfc_check_random_init and diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 2fca8ad..df21ce0 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2431,7 +2431,7 @@ variable_decl (int elem) } if (not_constant) - { + { gfc_error ("Explicit shaped array with nonconstant bounds at %C"); m = MATCH_ERROR; goto cleanup; @@ -2535,13 +2535,12 @@ variable_decl (int elem) gfc_find_symbol (name, gfc_current_ns, 1, &sym); if (sym != NULL && sym->attr.cray_pointee) { - sym->ts.type = current_ts.type; - sym->ts.kind = current_ts.kind; - sym->ts.u.cl = cl; - sym->ts.u.derived = current_ts.u.derived; - sym->ts.is_c_interop = current_ts.is_c_interop; - sym->ts.is_iso_c = current_ts.is_iso_c; m = MATCH_YES; + if (!gfc_add_type (sym, ¤t_ts, &gfc_current_locus)) + { + m = MATCH_ERROR; + goto cleanup; + } /* Check to see if we have an array specification. */ if (cp_as != NULL) |