URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
! { dg-do compile }
|
! { dg-do compile }
|
! Tests the fix for PR30273, in which the pointer assignment was
|
! Tests the fix for PR30273, in which the pointer assignment was
|
! wrongly determined to have dependence because NULL() was not
|
! wrongly determined to have dependence because NULL() was not
|
! recognised by the analysis.
|
! recognised by the analysis.
|
!
|
!
|
! Contributed by Harald Anlauf
|
! Contributed by Harald Anlauf
|
!
|
!
|
module gfcbug49
|
module gfcbug49
|
implicit none
|
implicit none
|
|
|
type spot_t
|
type spot_t
|
integer, pointer :: vm(:,:,:)
|
integer, pointer :: vm(:,:,:)
|
end type spot_t
|
end type spot_t
|
|
|
type rc_t
|
type rc_t
|
integer :: n
|
integer :: n
|
type(spot_t), pointer :: spots(:) => NULL()
|
type(spot_t), pointer :: spots(:) => NULL()
|
end type rc_t
|
end type rc_t
|
|
|
contains
|
contains
|
|
|
subroutine construct (rc, n)
|
subroutine construct (rc, n)
|
type(rc_t), intent(out) :: rc
|
type(rc_t), intent(out) :: rc
|
integer , intent(in) :: n
|
integer , intent(in) :: n
|
integer :: k
|
integer :: k
|
rc% n = n
|
rc% n = n
|
allocate (rc% spots (n))
|
allocate (rc% spots (n))
|
forall (k=1:n)
|
forall (k=1:n)
|
rc% spots (k)% vm => NULL() ! gfortran didn't swallow this
|
rc% spots (k)% vm => NULL() ! gfortran didn't swallow this
|
end forall
|
end forall
|
end subroutine construct
|
end subroutine construct
|
|
|
end module gfcbug49
|
end module gfcbug49
|
! { dg-final { cleanup-modules "gfcbug49" } }
|
! { dg-final { cleanup-modules "gfcbug49" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.