PR fortran/33986
* trans-array.c (gfc_conv_array_parameter ): Allow allocatable
function results.
2007-11-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33986
* gfortran.dg/allocatable_function_3.f90.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130228
138bc75d-0d04-0410-961f-
82ee72b054a4
-2007-11-15 Tobias Burnus <burnus@net-b.de>
+2007-11-16 Paul Thomas <pault@gcc.gnu.org>
- PR fortran/33917
- * decl.c (match_procedure_decl): Pre-resolve interface.
- * resolve.c (resolve_symbol): Reject interfaces later
- declared in procedure statements.
+ PR fortran/33986
+ * trans-array.c (gfc_conv_array_parameter ): Allow allocatable
+ function results.
2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
}
if (sym->attr.allocatable)
{
- if (sym->attr.dummy)
+ if (sym->attr.dummy || sym->attr.result)
{
gfc_conv_expr_descriptor (se, expr, ss);
se->expr = gfc_conv_array_data (se->expr);
+2007-11-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/33986
+ * gfortran.dg/allocatable_function_3.f90.
+
2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34113
--- /dev/null
+! { dg-do run }
+! Tests the fix for PR33986, in which the call to scram would call
+! an ICE because allocatable result actuals had not been catered for.
+!
+! Contributed by Damian Rouson <damian@rouson.net>
+!
+function transform_to_spectral_from() result(spectral)
+ integer, allocatable :: spectral(:)
+ allocate(spectral(2))
+ call scram(spectral)
+end function transform_to_spectral_from
+
+subroutine scram (x)
+ integer x(2)
+ x = (/1,2/)
+end subroutine
+
+ interface
+ function transform_to_spectral_from() result(spectral)
+ integer, allocatable :: spectral(:)
+ end function transform_to_spectral_from
+ end interface
+ if (any (transform_to_spectral_from () .ne. (/1,2/))) call abort ()
+end