OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [import5.f90] - Blame information for rev 315

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! Test for import in interfaces PR fortran/30922
3
!
4
! Contributed by Tobias Burnus 
5
!
6
module test_import
7
  implicit none
8
 
9
  type :: my_type
10
     integer :: data
11
  end type my_type
12
  integer, parameter :: n = 20
13
 
14
  interface
15
     integer function func1(param)
16
       import
17
       type(my_type) :: param(n)
18
     end function func1
19
 
20
     integer function func2(param)
21
       import :: my_type
22
       type(my_type), value :: param
23
     end function func2
24
  end interface
25
 
26
contains
27
 
28
  subroutine sub1 ()
29
 
30
    interface
31
      integer function func3(param)
32
        import
33
        type(my_type), dimension (n) :: param
34
      end function func3
35
 
36
      integer function func4(param)
37
        import :: my_type, n
38
        type(my_type), dimension (n) :: param
39
      end function func4
40
    end interface
41
 
42
  end subroutine sub1
43
end module test_import
44
! { dg-final { cleanup-modules "test_import" } }

powered by: WebSVN 2.1.0

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