2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
fortran/
PR fortran/17740
* trans-expr.c (gfc_trans_arrayfunc_assign): Check value
of attr.elemental for specific function instead of generic name.
testsuite/
PR fortran/17740
* gfortran.dg/generic_4.f90: New test.
From-SVN: r104240
+2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
+
+ PR fortran/17740
+ * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
+ of attr.elemental for specific function instead of generic name.
+
2005-09-13 Richard Sandiford <richard@codesourcery.com>
PR fortran/18899
return NULL;
/* Elemental functions don't need a temporary anyway. */
- if (expr2->symtree->n.sym->attr.elemental)
+ if (expr2->value.function.esym != NULL
+ && expr2->value.function.esym->attr.elemental)
return NULL;
/* Fail if EXPR1 can't be expressed as a descriptor. */
+2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
+
+ PR fortran/17740
+ * gfortran.dg/generic_4.f90: New test.
+
2005-09-13 Bastian Blank <waldi@debian.org>
PR c++/16171
--- /dev/null
+! { dg-do run }
+! reduced testcase from PR 17740
+module FOO
+
+ interface BAR
+ module procedure BAR2
+ end interface
+
+contains
+
+ elemental integer function BAR2(X)
+ integer, intent(in) :: X
+ BAR2 = X
+ end function
+
+ subroutine BAZ(y,z)
+ integer :: Y(3), Z(3)
+ Z = BAR(Y)
+ end subroutine
+
+end module
+
+use foo
+integer :: y(3), z(3)
+y = (/1,2,3/)
+call baz(y,z)
+if (any (y /= z)) call abort ()
+end