diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-22 09:32:11 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-22 09:32:11 +0000 |
commit | 70e392bbd9e94ac90b4040782f1a2b424677ff10 (patch) | |
tree | 422fdb8c37217bfc8598a7e3f79ac6671571df52 /gcc/fortran/expr.c | |
parent | 38fbbe0d1ac7afce85d0f81ea787e8848ed2f517 (diff) | |
download | gcc-70e392bbd9e94ac90b4040782f1a2b424677ff10.tar.gz |
2011-09-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/41733
* expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
procedures.
* interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
for PURE and ELEMENTAL attributes.
(compare_actual_formal): Remove pureness check here.
2011-09-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/41733
* gfortran.dg/impure_actual_1.f90: Modified error message.
* gfortran.dg/proc_ptr_32.f90: New.
* gfortran.dg/proc_ptr_33.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 3c09a2a99c4..813a99d037b 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3432,7 +3432,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) rvalue->symtree->name, &rvalue->where); return FAILURE; } - /* Check for C727. */ + /* Check for F08:C729. */ if (attr.flavor == FL_PROCEDURE) { if (attr.proc == PROC_ST_FUNCTION) @@ -3448,6 +3448,14 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) rvalue->symtree->name, &rvalue->where) == FAILURE) return FAILURE; } + /* Check for F08:C730. */ + if (attr.elemental && !attr.intrinsic) + { + gfc_error ("Nonintrinsic elemental procedure '%s' is invalid " + "in procedure pointer assigment at %L", + rvalue->symtree->name, &rvalue->where); + return FAILURE; + } /* Ensure that the calling convention is the same. As other attributes such as DLLEXPORT may differ, one explicitly only tests for the |