* trans-types.c (gfc_return_by_reference): Remove superfluous
assertion.
+ * intrinsic.h (gfc_resolve_getcwd): Update prototype.
+ * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
+
+ PR fortran/17615
+ * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
+ function to determine return type.
+
2004-09-20 Jan Hubicka <jh@suse.cz>
* trans-decl.c (build_entry_thunks): Finalize the function; do not lower
/* The frontend doesn't seem to bother filling in expr->symtree for intrinsic
functions. */
gcc_assert (expr2->value.function.isym
- || (gfc_return_by_reference (expr2->symtree->n.sym)
- && expr2->symtree->n.sym->result->attr.dimension));
+ || (gfc_return_by_reference (expr2->value.function.esym)
+ && expr2->value.function.esym->result->attr.dimension));
ss = gfc_walk_expr (expr1);
gcc_assert (ss != gfc_ss_terminator);
+2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/17615
+ * gfortran.dg/pr17615.f90: New test.
+
2004-09-24 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimzation/17517
--- /dev/null
+! { dg-do compile }
+! we didn't look at the right symbol when genrating code. This broke
+! when array valued functions came into play.
+module module_vec3d
+ INTERFACE cross_product
+ MODULE PROCEDURE cross_product3_R4_R8
+ END INTERFACE
+CONTAINS
+ FUNCTION cross_product3_R4_R8 ()
+ real(8) :: cross_product3_r4_r8(3)
+ cross_product3_r4_r8 = 0
+ END FUNCTION cross_product3_R4_R8
+END MODULE module_vec3d
+
+PROGRAM TEST
+ use module_vec3d, only: cross_product
+ real(8) :: c(3)
+ c = cross_product()
+END PROGRAM TEST