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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [private_type_3.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! { dg-options "-O0" }
! { dg-options "-O0" }
! Tests the fix for PR24207 and the problems associated
! Tests the fix for PR24207 and the problems associated
! with the fix for PR21986. In two cases, use associated
! with the fix for PR21986. In two cases, use associated
! public symbols were taking on the default private access
! public symbols were taking on the default private access
! attribute of the local namespace. In the third, a private
! attribute of the local namespace. In the third, a private
! symbol was not available to a namelist in contained
! symbol was not available to a namelist in contained
! procedure in the same module.
! procedure in the same module.
!
!
! Based on the example in PR24207.
! Based on the example in PR24207.
!
!
module a
module a
  implicit none
  implicit none
  real b
  real b
  type :: mytype
  type :: mytype
    integer :: c
    integer :: c
  end type mytype
  end type mytype
end module a
end module a
module c
module c
  use a
  use a
  implicit none
  implicit none
  public d
  public d
  private
  private
  real x
  real x
  contains
  contains
     subroutine d (arg_t)   ! This would cause an error
     subroutine d (arg_t)   ! This would cause an error
        type (mytype) :: arg_t
        type (mytype) :: arg_t
        namelist /e/ b, x   ! .... as would this.
        namelist /e/ b, x   ! .... as would this.
        read(5,e)
        read(5,e)
        arg_t%c = 42
        arg_t%c = 42
     end subroutine d
     end subroutine d
end module c
end module c
! { dg-final { cleanup-modules "a c" } }
! { dg-final { cleanup-modules "a c" } }
 
 

powered by: WebSVN 2.1.0

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