OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [whole_file_14.f90] - Blame information for rev 307

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-fwhole-file -O3" }
3
! Check that the derived types are correctly substituted when
4
! whole file compiling.
5
!
6
! Contributed by Dominique d'Humieres  
7
!
8
module global
9
 type                                ::  mytype
10
   type(mytype),pointer   ::  this
11
 end type mytype
12
 type(mytype),target        :: base
13
end module global
14
 
15
program test_equi
16
  use global
17
  call check()
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)
21
contains
22
  subroutine check()
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
27
end program test_equi
28
! { dg-final { cleanup-modules "global" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.