aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 6e9125f..4d657e0 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -1885,8 +1885,15 @@ gfc_match_associate (void)
if (gfc_match (" %n => %e", newAssoc->name, &newAssoc->target)
!= MATCH_YES)
{
- gfc_error ("Expected association at %C");
- goto assocListError;
+ /* Have another go, allowing for procedure pointer selectors. */
+ gfc_matching_procptr_assignment = 1;
+ if (gfc_match (" %n => %e", newAssoc->name, &newAssoc->target)
+ != MATCH_YES)
+ {
+ gfc_error ("Expected association at %C");
+ goto assocListError;
+ }
+ gfc_matching_procptr_assignment = 0;
}
newAssoc->where = gfc_current_locus;