diff options
author | Janus Weil <janus@gcc.gnu.org> | 2012-07-31 20:32:41 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2012-07-31 20:32:41 +0200 |
commit | 0e8d854eb8bbfc44c1fd9d2fa6e07514d2932e0e (patch) | |
tree | 9616650ee31fffec962f6770ab78c4b7b3506558 /gcc/fortran/intrinsic.c | |
parent | ab6d55ef6209019d4268546aa030928b72f59b49 (diff) | |
download | gcc-0e8d854eb8bbfc44c1fd9d2fa6e07514d2932e0e.zip gcc-0e8d854eb8bbfc44c1fd9d2fa6e07514d2932e0e.tar.gz gcc-0e8d854eb8bbfc44c1fd9d2fa6e07514d2932e0e.tar.bz2 |
re PR fortran/42418 (PROCEDURE: Rejects interface which is both specific and generic procedure)
2012-07-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/42418
* decl.c (match_procedure_interface): Move some checks to
'resolve_procedure_interface'. Set flavor if appropriate.
* expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
* intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
identify a procedure as being non-intrinsic.
* resolve.c (resolve_procedure_interface): Checks moved here from
'match_procedure_interface'. Minor cleanup.
(resolve_formal_arglist,resolve_symbol): Cleanup of
'resolve_procedure_interface'
(resolve_actual_arglist,is_external_proc): Cleanup of
'gfc_is_intrinsic'.
2012-07-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/42418
* gfortran.dg/proc_decl_29.f90: New.
From-SVN: r190017
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index dbfadb4..60c68fe 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -902,9 +902,9 @@ gfc_intrinsic_actual_ok (const char *name, const bool subroutine_flag) } -/* Given a symbol, find out if it is (and is to be treated) an intrinsic. If - it's name refers to an intrinsic but this intrinsic is not included in the - selected standard, this returns FALSE and sets the symbol's external +/* Given a symbol, find out if it is (and is to be treated as) an intrinsic. + If its name refers to an intrinsic, but this intrinsic is not included in + the selected standard, this returns FALSE and sets the symbol's external attribute. */ bool @@ -913,10 +913,13 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag, locus loc) gfc_intrinsic_sym* isym; const char* symstd; - /* If INTRINSIC/EXTERNAL state is already known, return. */ + /* If INTRINSIC attribute is already known, return. */ if (sym->attr.intrinsic) return true; - if (sym->attr.external) + + /* Check for attributes which prevent the symbol from being INTRINSIC. */ + if (sym->attr.external || sym->attr.contained + || sym->attr.if_source == IFSRC_IFBODY) return false; if (subroutine_flag) |