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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_dummy_types_1.f90] - Blame information for rev 827

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! This checks the fix for PR20244 in which USE association
3
! of derived types would cause an ICE, if the derived type
4
! was also available by host association. This occurred
5
! because the backend declarations were different.
6
!
7
! Contributed by Paul Thomas  
8
!==============
9
module mtyp
10
  type t1
11
     integer::a
12
  end type t1
13
end module mtyp
14
!==============
15
module atest
16
  use mtyp
17
  type(t1)::ze
18
contains
19
  subroutine test(ze_in )
20
    use mtyp
21
    implicit none
22
    type(t1)::ze_in
23
    ze_in = ze
24
  end subroutine test
25
  subroutine init( )
26
    implicit none
27
    ze = t1 (42)
28
  end subroutine init
29
end module atest
30
!==============
31
  use atest
32
  type(t1) :: res = t1 (0)
33
  call init ()
34
  call test (res)
35
  if (res%a.ne.42) call abort
36
end
37
 
38
! { dg-final { cleanup-modules "mtyp atest" } }

powered by: WebSVN 2.1.0

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