Commit c0c07d7b by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/17615 (Internal compiler error using interface procedures)

fortran/
PR fortran/17615
* trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
function to determine return type.

testsuite/
PR fortran/17615
* gfortran.dg/pr17615.f90: New test.

From-SVN: r88061
parent 3d15015d
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
* trans-types.c (gfc_return_by_reference): Remove superfluous * trans-types.c (gfc_return_by_reference): Remove superfluous
assertion. 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> 2004-09-20 Jan Hubicka <jh@suse.cz>
* trans-decl.c (build_entry_thunks): Finalize the function; do not lower * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
......
...@@ -2007,8 +2007,8 @@ gfc_trans_arrayfunc_assign (gfc_expr * expr1, gfc_expr * expr2) ...@@ -2007,8 +2007,8 @@ gfc_trans_arrayfunc_assign (gfc_expr * expr1, gfc_expr * expr2)
/* The frontend doesn't seem to bother filling in expr->symtree for intrinsic /* The frontend doesn't seem to bother filling in expr->symtree for intrinsic
functions. */ functions. */
gcc_assert (expr2->value.function.isym gcc_assert (expr2->value.function.isym
|| (gfc_return_by_reference (expr2->symtree->n.sym) || (gfc_return_by_reference (expr2->value.function.esym)
&& expr2->symtree->n.sym->result->attr.dimension)); && expr2->value.function.esym->result->attr.dimension));
ss = gfc_walk_expr (expr1); ss = gfc_walk_expr (expr1);
gcc_assert (ss != gfc_ss_terminator); 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> 2004-09-24 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimzation/17517 PR tree-optimzation/17517
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment