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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [private_type_3.f90] - Blame information for rev 715

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-O0" }
3
! Tests the fix for PR24207 and the problems associated
4
! with the fix for PR21986. In two cases, use associated
5
! public symbols were taking on the default private access
6
! attribute of the local namespace. In the third, a private
7
! symbol was not available to a namelist in contained
8
! procedure in the same module.
9
!
10
! Based on the example in PR24207.
11
!
12
module a
13
  implicit none
14
  real b
15
  type :: mytype
16
    integer :: c
17
  end type mytype
18
end module a
19
module c
20
  use a
21
  implicit none
22
  public d
23
  private
24
  real x
25
  contains
26
     subroutine d (arg_t)   ! This would cause an error
27
        type (mytype) :: arg_t
28
        namelist /e/ b, x   ! .... as would this.
29
        read(5,e)
30
        arg_t%c = 42
31
     end subroutine d
32
end module c
33
 
34
! { 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.