PR fortran/42051
PR fortran/43896
* trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
functions with CLASS formal arguments.
2010-06-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42051
PR fortran/43896
* gfortran.dg/class_23.f03: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160622
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/42051
+ PR fortran/43896
+ * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
+ functions with CLASS formal arguments.
+
2010-06-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/44207
ss = gfc_walk_expr (e);
if (ss == gfc_ss_terminator)
{
+ parmse->ss = NULL;
gfc_conv_expr_reference (parmse, e);
tmp = fold_convert (TREE_TYPE (ctree), parmse->expr);
gfc_add_modify (&parmse->pre, ctree, tmp);
}
else
{
+ parmse->ss = ss;
gfc_conv_expr (parmse, e);
gfc_add_modify (&parmse->pre, ctree, parmse->expr);
}
+2010-06-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/42051
+ PR fortran/43896
+ * gfortran.dg/class_23.f03: New test.
+
2010-06-11 Jan Hubicka <jh@suse.cz>
* gcc.dg/ipa/pure-const-2.c: New testcase.
--- /dev/null
+! { dg-do compile }
+!
+! PR 42051: [OOP] ICE on array-valued function with CLASS formal argument
+!
+! Original test case by Damian Rouson <damian@rouson.net>
+! Modified by Janus Weil <janus@gcc.gnu.org>
+
+ type grid
+ end type
+
+contains
+
+ function return_x(this) result(this_x)
+ class(grid) :: this
+ real ,dimension(1) :: this_x
+ end function
+
+ subroutine output()
+ type(grid) :: mesh
+ real ,dimension(1) :: x
+ x = return_x(mesh)
+ end subroutine
+
+end