diff options
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 268e6af..89ffbaf 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -3237,6 +3237,13 @@ parse_associate (void) sym->assoc = a; sym->declared_at = a->where; gfc_set_sym_referenced (sym); + + /* Initialize the typespec. It is not available in all cases, + however, as it may only be set on the target during resolution. + Still, sometimes it helps to have it right now -- especially + for parsing component references on the associate-name + in case of assication to a derived-type. */ + sym->ts = a->target->ts; } accept_statement (ST_ASSOCIATE); |