diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 6f5765f1784..d501d682475 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "match.h" #include "parse.h" +int gfc_matching_procptr_assignment = 0; /* For debugging and diagnostic purposes. Return the textual representation of the intrinsic operator OP. */ @@ -1329,6 +1330,7 @@ gfc_match_pointer_assignment (void) old_loc = gfc_current_locus; lvalue = rvalue = NULL; + gfc_matching_procptr_assignment = 0; m = gfc_match (" %v =>", &lvalue); if (m != MATCH_YES) @@ -1337,7 +1339,11 @@ gfc_match_pointer_assignment (void) goto cleanup; } + if (lvalue->symtree->n.sym->attr.proc_pointer) + gfc_matching_procptr_assignment = 1; + m = gfc_match (" %e%t", &rvalue); + gfc_matching_procptr_assignment = 0; if (m != MATCH_YES) goto cleanup; |