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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [compile/] [enum_1.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! Program to test parsing of ENUM in different program units
2
 
3
program main
4
  implicit none
5
  interface
6
    subroutine sub1
7
    end subroutine sub1
8
  end interface
9
  integer :: i = 55
10
 
11
  enum , bind (c)
12
    enumerator :: a , b=5
13
    enumerator c, d
14
  end enum
15
 
16
  call sub
17
  call sub1
18
  i = fun()
19
 
20
contains
21
 
22
  subroutine sub
23
    enum, bind(c)
24
      enumerator :: p = b, q = 10 + 50
25
      enumerator r, s
26
    end enum
27
  end subroutine sub
28
 
29
  function fun()
30
  integer :: fun
31
  enum, bind (c)
32
    enumerator :: red, yellow = 23
33
    enumerator :: blue
34
    enumerator :: green
35
  end enum
36
  fun = 1
37
  end function fun
38
end program main
39
 
40
subroutine sub1
41
  implicit none
42
  enum, bind(c)
43
    enumerator x , y
44
    enumerator :: z = 100
45
  end enum
46
end subroutine sub1

powered by: WebSVN 2.1.0

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