Commit 2b3fd25f by Tobias Burnus Committed by Tobias Burnus

re PR testsuite/31240 (gfortran.dg/pointer_intent_1.f90 failure at -O0)

2007-04-11  Tobias Burnus  <burnus@net-b.de>

       PR testsuite/31240
       * gfortran.dg/pointer_intent_1.f90: Fix test.

From-SVN: r123712
parent ffd34392
2007-04-11 Tobias Burnus <burnus@net-b.de>
PR testsuite/31240
* gfortran.dg/pointer_intent_1.f90: Fix test.
2007-04-10 Eric Christopher <echristo@apple.com> 2007-04-10 Eric Christopher <echristo@apple.com>
* lib/target-supports.exp * lib/target-supports.exp
! { dg-run } ! { dg-do run }
! { dg-options "-std=f2003 -fall-intrinsics" } ! { dg-options "-std=f2003 -fall-intrinsics" }
! Pointer intent test ! Pointer intent test
! PR fortran/29624 ! PR fortran/29624
...@@ -21,7 +21,11 @@ program test ...@@ -21,7 +21,11 @@ program test
deallocate(p) deallocate(p)
nullify(p) nullify(p)
call a(p,t) call a(p,t)
t2%x = 5
allocate(t2%point)
t2%point = 42
call nonpointer(t2) call nonpointer(t2)
if(t2%point /= 7) call abort()
contains contains
subroutine a(p,t) subroutine a(p,t)
integer, pointer,intent(in) :: p integer, pointer,intent(in) :: p
...@@ -60,12 +64,14 @@ contains ...@@ -60,12 +64,14 @@ contains
subroutine foo(comp) subroutine foo(comp)
type(myT), intent(inout) :: comp type(myT), intent(inout) :: comp
if(comp%x /= -15) call abort() if(comp%x /= -15) call abort()
!if(comp%point /= 27) call abort() if(comp%point /= 27) call abort()
comp%x = 32 comp%x = 32
comp%point = -98 comp%point = -98
end subroutine foo end subroutine foo
subroutine nonpointer(t) subroutine nonpointer(t)
type(myT), intent(in) :: t type(myT), intent(in) :: t
if(t%x /= 5 ) call abort()
if(t%point /= 42) call abort()
t%point = 7 t%point = 7
end subroutine nonpointer end subroutine nonpointer
end program end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment