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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [enum_3.f90] - Blame information for rev 303

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 303 jeremybenn
! Program to test the initialisation range of enumerators
2
! and kind values check
3
 
4
program main
5
  implicit none
6
 
7
  enum, bind (c)
8
    enumerator :: red , yellow =255 , blue
9
  end enum
10
 
11
  enum, bind (c)
12
    enumerator :: r , y = 32767, b
13
  end enum
14
 
15
  enum, bind (c)
16
    enumerator :: aa , bb = 65535, cc
17
  end enum
18
 
19
  enum, bind (c)
20
    enumerator :: m , n = 2147483645, o
21
  end enum
22
 
23
 
24
 if (red /= 0 ) call abort
25
 if (yellow /= 255) call abort
26
 if (blue /= 256) call abort
27
 
28
 if (r /= 0 ) call abort
29
 if (y /= 32767) call abort
30
 if (b /= 32768) call abort
31
 
32
 if (kind (red) /= 4) call abort
33
 if (kind (yellow) /= 4) call abort
34
 if (kind (blue) /= 4) call abort
35
 
36
 if (kind(r) /= 4 ) call abort
37
 if (kind(y) /= 4) call abort
38
 if (kind(b) /= 4) call abort
39
 
40
 if (aa /= 0 ) call abort
41
 if (bb /= 65535) call abort
42
 if (cc /= 65536) call abort
43
 
44
 if (kind (aa) /= 4 ) call abort
45
 if (kind (bb) /= 4) call abort
46
 if (kind (cc) /= 4) call abort
47
 
48
 
49
 if (m /= 0 ) call abort
50
 if (n /= 2147483645) call abort
51
 if (o /= 2147483646) call abort
52
 
53
 if (kind (m) /= 4 ) call abort
54
 if (kind (n) /= 4) call abort
55
 if (kind (o) /= 4) call abort
56
 
57
end program main

powered by: WebSVN 2.1.0

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