URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do run }
|
! { dg-do run }
|
!
|
!
|
! PR fortran/41777
|
! PR fortran/41777
|
!
|
!
|
module m
|
module m
|
type t2
|
type t2
|
integer :: i
|
integer :: i
|
end type t2
|
end type t2
|
interface f
|
interface f
|
module procedure f2
|
module procedure f2
|
end interface f
|
end interface f
|
contains
|
contains
|
function f2(a)
|
function f2(a)
|
type(t2), pointer :: f2,a
|
type(t2), pointer :: f2,a
|
f2 => a
|
f2 => a
|
end function f2
|
end function f2
|
end module m
|
end module m
|
|
|
use m
|
use m
|
implicit none
|
implicit none
|
type(t2), pointer :: a
|
type(t2), pointer :: a
|
allocate(a)
|
allocate(a)
|
if (.not. associated(a,f(a))) call abort()
|
if (.not. associated(a,f(a))) call abort()
|
call cmpPtr(a,f2(a))
|
call cmpPtr(a,f2(a))
|
call cmpPtr(a,f(a))
|
call cmpPtr(a,f(a))
|
deallocate(a)
|
deallocate(a)
|
contains
|
contains
|
subroutine cmpPtr(a,b)
|
subroutine cmpPtr(a,b)
|
type(t2), pointer :: a,b
|
type(t2), pointer :: a,b
|
! print *, associated(a,b)
|
! print *, associated(a,b)
|
if (.not. associated (a, b)) call abort()
|
if (.not. associated (a, b)) call abort()
|
end subroutine cmpPtr
|
end subroutine cmpPtr
|
end
|
end
|
|
|
! { dg-final { cleanup-modules "m" } }
|
! { dg-final { cleanup-modules "m" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.