diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-14 00:59:09 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-14 00:59:09 +0000 |
commit | 6cc309c9234d18f69b2c70ec0220becf3b0f58f5 (patch) | |
tree | c296e0620442c1d321dbe2b55bcada779f15b955 /gcc/fortran/decl.c | |
parent | 7cbb9e290262fc10104e673248332e1a889ac1b4 (diff) | |
download | gcc-6cc309c9234d18f69b2c70ec0220becf3b0f58f5.zip gcc-6cc309c9234d18f69b2c70ec0220becf3b0f58f5.tar.gz gcc-6cc309c9234d18f69b2c70ec0220becf3b0f58f5.tar.bz2 |
re PR fortran/33162 (INTRINSIC functions as ACTUAL argument)
2007-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33162
* decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
PROCEDURE declarations. Set attr.untyped to allow the interface to be
resolved later where the symbol type will be set.
* interface.c (compare_intr_interfaces): Remove static from pointer
declarations. Add type and kind checks for dummy function arguments.
(compare_actual_formal_intr): New function to compare an actual
argument with an intrinsic function. (gfc_procedures_use): Add check for
interface that points to an intrinsic function, use the new function.
* resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
(resolve_specific_s0): Ditto.
From-SVN: r130168
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 74c655d..29b02ea 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3968,19 +3968,9 @@ match_procedure_decl (void) "in PROCEDURE statement at %C", proc_if->name); return MATCH_ERROR; } - /* TODO: Allow intrinsics with gfc_intrinsic_actual_ok - (proc_if->name, 0) after PR33162 is fixed. */ - if (proc_if->attr.intrinsic) - { - gfc_error ("Fortran 2003: Support for intrinsic procedure '%s' " - "in PROCEDURE statement at %C not yet implemented " - "in gfortran", proc_if->name); - return MATCH_ERROR; - } } got_ts: - if (gfc_match (" )") != MATCH_YES) { gfc_current_locus = entry_loc; @@ -3995,7 +3985,6 @@ got_ts: /* Get procedure symbols. */ for(num=1;;num++) { - m = gfc_match_symbol (&sym, 0); if (m == MATCH_NO) goto syntax; @@ -4040,7 +4029,10 @@ got_ts: /* Set interface. */ if (proc_if != NULL) - sym->interface = proc_if; + { + sym->interface = proc_if; + sym->attr.untyped = 1; + } else if (current_ts.type != BT_UNKNOWN) { sym->interface = gfc_new_symbol ("", gfc_current_ns); |