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
7module m1
8  type mytype
9    real :: a(10) = 2
10  end type
11end module m1
12
13module m2
14  type mytype
15    real :: b(10) = 8
16  end type
17end module m2
18
19program p
20use m1, t1 => mytype
21use m2, t2 => mytype
22implicit none
23
24class(t1), allocatable :: x
25class(t2), allocatable :: y
26
27allocate (t1 :: x)
28allocate (t2 :: y)
29
30print *, x%a
31print *, y%b
32end
33