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
2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
class_29.f03
blob
d5ed8fae35c78f206feb1d8f95ce70ac860cb302
1
! { dg-do compile }
2
!
3
! PR 46313: [OOP] OOP-ABI issue, ALLOCATE issue, CLASS renaming issue
4
!
5
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
6
7
module m1
8
type mytype
9
real :: a(10) = 2
10
end type
11
end module m1
12
13
module m2
14
type mytype
15
real :: b(10) = 8
16
end type
17
end module m2
18
19
program p
20
use m1, t1 => mytype
21
use m2, t2 => mytype
22
implicit none
23
24
class(t1), allocatable :: x
25
class(t2), allocatable :: y
26
27
allocate (t1 :: x)
28
allocate (t2 :: y)
29
30
print *, x%a
31
print *, y%b
32
end
33
34
! { dg-final { cleanup-modules "m1 m2" } }