re PR fortran/55134 (associate construct and assumed size array)

2012-10-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55134
        * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED
        * as
        array with descriptor.

2012-10-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55134
        * gfortran.dg/associate_11.f90: New.

From-SVN: r193041
This commit is contained in:
Tobias Burnus 2012-10-31 18:22:26 +01:00 committed by Tobias Burnus
parent 3b1de8eba7
commit 2d98d2b4f9
4 changed files with 37 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-10-31 Tobias Burnus <burnus@net-b.de>
PR fortran/55134
* trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
array with descriptor.
2012-10-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54958

View file

@ -7012,6 +7012,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77,
if (!sym->attr.pointer
&& sym->as
&& sym->as->type != AS_ASSUMED_SHAPE
&& sym->as->type != AS_DEFERRED
&& sym->as->type != AS_ASSUMED_RANK
&& !sym->attr.allocatable)
{

View file

@ -1,3 +1,8 @@
2012-10-31 Tobias Burnus <burnus@net-b.de>
PR fortran/55134
* gfortran.dg/associate_11.f90: New.
2012-10-31 Dodji Seketeli <dodji@redhat.com>
PR c++/54955

View file

@ -0,0 +1,25 @@
! { dg-do run }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/55134
!
! Contributed by Valery Weber
!
program bug
implicit none
integer,dimension(1)::i
i(:)=1
associate(a =>i)
call foo(a)
end associate
! write(*,*) i
if (i(1) /= 2) call abort
contains
subroutine foo(v)
integer, dimension(*) :: v
v(1)=2
end subroutine foo
end program bug
! { dg-final { scan-tree-dump-times "foo ..integer.kind=4..0:. . restrict. a.data.;" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }