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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 46313: [OOP] OOP-ABI issue, ALLOCATE issue, CLASS renaming issue
4
!
5
! Contributed by Tobias Burnus 
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" } }

powered by: WebSVN 2.1.0

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