PR fortran/17678
* trans-array.c (gfc_trans_deferred_array): Leave use associated
variables alone.
testsuite/
* gfortran.dg/use_allocated_1.f90: New test.
From-SVN: r88655
+2004-10-07 Paul Brook <paul@codesourcery.com>
+
+ PR fortran/17678
+ * trans-array.c (gfc_trans_deferred_array): Leave use associated
+ variables alone.
+
2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/17568
&& !INTEGER_CST_P (sym->ts.cl->backend_decl))
gfc_trans_init_string_length (sym->ts.cl, &fnblock);
- /* Parameter variables don't need anything special. */
- if (sym->attr.dummy)
+ /* Parameter and use associated variables don't need anything special. */
+ if (sym->attr.dummy || sym->attr.use_assoc)
{
gfc_add_expr_to_block (&fnblock, body);
+2004-10-07 Paul Brook <paul@codesourcery.com>
+
+ PR fortran/17678
+ * gfortran.dg/use_allocated_1.f90: New test.
+
2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17849
--- /dev/null
+! { dg-do run }
+! PR17678
+! We were incorrectly setting use-associated variables to unallocated
+! on procedure entry.
+module foo
+ integer, dimension(:), allocatable :: bar
+end module
+
+program main
+ use foo
+ allocate (bar(10))
+ call init
+end program main
+
+subroutine init
+ use foo
+ if (.not.allocated(bar)) call abort
+end subroutine init