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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [extends_10.f03] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 42545: type extension: parent component has wrong accessibility
4
!
5
! Reported by Reinhold Bader 
6
 
7
module mo
8
  implicit none
9
  type :: t1
10
    integer :: i = 1
11
  end type
12
  type, extends(t1) :: t2
13
    private
14
    real :: x = 2.0
15
  end type
16
  type :: u1
17
    integer :: j = 1
18
  end type
19
  type, extends(u1) :: u2
20
    real :: y = 2.0
21
  end type
22
  private :: u1
23
end module
24
 
25
program pr
26
  use mo
27
  implicit none
28
  type(t2) :: a
29
  type(u2) :: b
30
  print *,a%t1%i
31
  print *,b%u1%j  ! { dg-error "is a PRIVATE component of" }
32
end program
33
 
34
! { dg-final { cleanup-modules "mo" } }

powered by: WebSVN 2.1.0

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