diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 11:31:55 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 11:31:55 +0000 |
commit | f3efaadaf83c4db4dc0bcf1e93b7050c5eeba890 (patch) | |
tree | 9476e2f4bdc3f2072057ad7def2aa663cf81b0a9 /gcc/fortran/match.c | |
parent | 85a846a29ab1ddab45ef5f8cc1640d27f0da5fc5 (diff) | |
download | gcc-f3efaadaf83c4db4dc0bcf1e93b7050c5eeba890.tar.gz |
2010-10-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/46060
* match.h (gfc_matching_ptr_assignment): New global variable to indicate
we're currently matching a (non-proc-)pointer assignment.
* decl.c (match_pointer_init): Set it.
* match.c (gfc_match_pointer_assignment): Ditto.
* primary.c (matching_actual_arglist): New global variable to indicate
we're currently matching an actual argument list.
(gfc_match_actual_arglist): Set it.
(gfc_match_varspec): Reject procedure pointer component calls with
missing argument list.
2010-10-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/46060
* gfortran.dg/proc_ptr_comp_25.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 836c95cc2df..efde1a6c71b 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "match.h" #include "parse.h" +int gfc_matching_ptr_assignment = 0; int gfc_matching_procptr_assignment = 0; bool gfc_matching_prefix = false; @@ -1331,6 +1332,7 @@ gfc_match_pointer_assignment (void) old_loc = gfc_current_locus; lvalue = rvalue = NULL; + gfc_matching_ptr_assignment = 0; gfc_matching_procptr_assignment = 0; m = gfc_match (" %v =>", &lvalue); @@ -1343,8 +1345,11 @@ gfc_match_pointer_assignment (void) if (lvalue->symtree->n.sym->attr.proc_pointer || gfc_is_proc_ptr_comp (lvalue, NULL)) gfc_matching_procptr_assignment = 1; + else + gfc_matching_ptr_assignment = 1; m = gfc_match (" %e%t", &rvalue); + gfc_matching_ptr_assignment = 0; gfc_matching_procptr_assignment = 0; if (m != MATCH_YES) goto cleanup; |