diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-07 22:20:47 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-07 22:20:47 +0000 |
commit | 74e666d3ae606c47fcdc3ee4929cbc43e42aa212 (patch) | |
tree | c17f3e416f39964150f112a3944dd6bbee17ea63 /gcc/fortran/primary.c | |
parent | 28f914e9a83cea51a9ff6e3a3457f2a51de5a88c (diff) | |
download | gcc-74e666d3ae606c47fcdc3ee4929cbc43e42aa212.tar.gz |
2011-09-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/48095
* primary.c (gfc_match_structure_constructor): Handle parsing of
procedure pointers components in structure constructors.
* resolve.c (resolve_structure_cons): Check interface of procedure
pointer components. Changed wording of some error messages.
2011-09-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/48095
* gfortran.dg/derived_constructor_comps_2.f90: Modified.
* gfortran.dg/impure_constructor_1.f90: Modified.
* gfortran.dg/proc_ptr_comp_33.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 8f3c7e51cef..bccf7d49cf9 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2418,7 +2418,10 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result, } /* Match the current initializer expression. */ + if (this_comp->attr.proc_pointer) + gfc_matching_procptr_assignment = 1; m = gfc_match_expr (&comp_tail->val); + gfc_matching_procptr_assignment = 0; if (m == MATCH_NO) goto syntax; if (m == MATCH_ERROR) |