fortran/
2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/28416
* trans-array.c (gfc_conv_array_parameter): Give special treatment
for ALLOCATABLEs if they are themselves dummy variables.
testsuite/
2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/28416
* gfortran.dg/allocatable_dummy_3.f90: New.
From-SVN: r115721
+2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
+
+ PR fortran/28416
+ * trans-array.c (gfc_conv_array_parameter): Give special treatment for
+ ALLOCATABLEs if they are themselves dummy variables.
+
2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25289
}
if (sym->attr.allocatable)
{
- se->expr = gfc_conv_array_data (tmp);
+ if (sym->attr.dummy)
+ {
+ gfc_conv_expr_descriptor (se, expr, ss);
+ se->expr = gfc_conv_array_data (se->expr);
+ }
+ else
+ se->expr = gfc_conv_array_data (tmp);
return;
}
}
+2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
+
+ PR fortran/28416
+ * gfortran.dg/allocatable_dummy_3.f90: New.
+
2006-07-24 Steven G. Kargl <kargls@comcast.net>
PR fortran/28439
--- /dev/null
+! { dg-do run }
+! PR 28416: Check that allocatable dummies can be passed onwards as non-assumed
+! shape arg.
+program main
+
+ implicit none
+ integer, allocatable :: a(:)
+
+ interface
+ subroutine foo(v_out)
+ integer, allocatable :: v_out(:)
+ end subroutine foo
+ end interface
+
+ call foo(a)
+ if (any(a /= [ 1, 2, 3 ])) call abort()
+
+end program
+
+
+subroutine foo(v_out)
+ implicit none
+ integer, allocatable :: v_out(:)
+
+ allocate(v_out(3))
+ call bar(v_out, size(v_out))
+end subroutine foo
+
+
+subroutine bar(v, N)
+ implicit none
+ integer :: N
+ integer :: v(N)
+ integer :: i
+
+ do i = 1, N
+ v(i) = i
+ end do
+end subroutine bar