2 ! { dg-options "-fwhole-file -O3" }
3 ! Check that the derived types are correctly substituted when
4 ! whole file compiling.
6 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr
10 type(mytype),pointer :: this
12 type(mytype),target :: base
18 print *, "base%this%this=>base?" , associated(base%this%this,base)
19 print *, "base%this%this=>?" , associated(base%this%this)
20 print *, "base%this=>?" , associated(base%this)
23 type(mytype),target :: j
24 base%this => j !have the variables point
25 j%this => base !to one another
26 end subroutine check !take j out of scope
28 ! { dg-final { cleanup-modules "global" } }