repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR ipa/83051
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
extends_10.f03
blob
40e928e3e542abd405260d053f41fe5451223f22
1
! { dg-do compile }
2
!
3
! PR 42545: type extension: parent component has wrong accessibility
4
!
5
! Reported by Reinhold Bader <bader@lrz.de>
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