re PR fortran/30273 ([4.1 only] gfc_todo: Not Implemented: Unable to determine rank of expression)

2006-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/30273
	* dependency.c (gfc_check_dependency): There is no dependency
	with EXPR_NULL so always return 0.

2006-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/30273
	* gfortran.dg/dependency_19.f90: New test.

From-SVN: r120117
This commit is contained in:
Paul Thomas 2006-12-21 19:56:34 +00:00
parent 54076f8b44
commit 681150cdaa
4 changed files with 46 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30273
* dependency.c (gfc_check_dependency): There is no dependency
with EXPR_NULL so always return 0.
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30202

View File

@ -694,6 +694,7 @@ gfc_check_dependency (gfc_expr * expr1, gfc_expr * expr2, bool identical)
return 0;
case EXPR_CONSTANT:
case EXPR_NULL:
return 0;
case EXPR_ARRAY:

View File

@ -1,3 +1,8 @@
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30273
* gfortran.dg/dependency_19.f90: New test.
2006-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30202

View File

@ -0,0 +1,34 @@
! { dg-do compile }
! Tests the fix for PR30273, in which the pointer assignment was
! wrongly determined to have dependence because NULL() was not
! recognised by the analysis.
!
! Contributed by Harald Anlauf <anlauf@gmx.de>
!
module gfcbug49
implicit none
type spot_t
integer, pointer :: vm(:,:,:)
end type spot_t
type rc_t
integer :: n
type(spot_t), pointer :: spots(:) => NULL()
end type rc_t
contains
subroutine construct (rc, n)
type(rc_t), intent(out) :: rc
integer , intent(in) :: n
integer :: k
rc% n = n
allocate (rc% spots (n))
forall (k=1:n)
rc% spots (k)% vm => NULL() ! gfortran didn't swallow this
end forall
end subroutine construct
end module gfcbug49
! { dg-final { cleanup-modules "gfcbug49" } }