This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40593] Proc-pointer returning function as actual argument
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2009 08:35:59 -0000
- Subject: [Bug fortran/40593] Proc-pointer returning function as actual argument
- References: <bug-40593-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from janus at gcc dot gnu dot org 2009-07-01 08:35 -------
The second example in comment #0 is fixed by the following patch:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 149129)
+++ gcc/fortran/resolve.c (working copy)
@@ -1828,7 +1828,10 @@ resolve_specific_f0 (gfc_symbol *sym, gf
found:
gfc_procedure_use (sym, &expr->value.function.actual, &expr->where);
- expr->ts = sym->ts;
+ if (sym->result)
+ expr->ts = sym->result->ts;
+ else
+ expr->ts = sym->ts;
expr->value.function.name = sym->name;
expr->value.function.esym = sym;
if (sym->as != NULL)
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-01 08:35:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40593