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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [leadz_trailz_1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
 
3
  integer(kind=1) :: i1
4
  integer(kind=2) :: i2
5
  integer(kind=4) :: i4
6
  integer(kind=8) :: i8
7
 
8
  i1 = -1
9
  i2 = -1
10
  i4 = -1
11
  i8 = -1
12
 
13
  if (leadz(i1) /= 0) call abort
14
  if (leadz(i2) /= 0) call abort
15
  if (leadz(i4) /= 0) call abort
16
  if (leadz(i8) /= 0) call abort
17
 
18
  if (trailz(i1) /= 0) call abort
19
  if (trailz(i2) /= 0) call abort
20
  if (trailz(i4) /= 0) call abort
21
  if (trailz(i8) /= 0) call abort
22
 
23
  if (leadz(-1_1) /= 0) call abort
24
  if (leadz(-1_2) /= 0) call abort
25
  if (leadz(-1_4) /= 0) call abort
26
  if (leadz(-1_8) /= 0) call abort
27
 
28
  if (trailz(-1_1) /= 0) call abort
29
  if (trailz(-1_2) /= 0) call abort
30
  if (trailz(-1_4) /= 0) call abort
31
  if (trailz(-1_8) /= 0) call abort
32
 
33
  i1 = -64
34
  i2 = -64
35
  i4 = -64
36
  i8 = -64
37
 
38
  if (leadz(i1) /= 0) call abort
39
  if (leadz(i2) /= 0) call abort
40
  if (leadz(i4) /= 0) call abort
41
  if (leadz(i8) /= 0) call abort
42
 
43
  if (trailz(i1) /= 6) call abort
44
  if (trailz(i2) /= 6) call abort
45
  if (trailz(i4) /= 6) call abort
46
  if (trailz(i8) /= 6) call abort
47
 
48
  if (leadz(-64_1) /= 0) call abort
49
  if (leadz(-64_2) /= 0) call abort
50
  if (leadz(-64_4) /= 0) call abort
51
  if (leadz(-64_8) /= 0) call abort
52
 
53
  if (trailz(-64_1) /= 6) call abort
54
  if (trailz(-64_2) /= 6) call abort
55
  if (trailz(-64_4) /= 6) call abort
56
  if (trailz(-64_8) /= 6) call abort
57
 
58
  i1 = -108
59
  i2 = -108
60
  i4 = -108
61
  i8 = -108
62
 
63
  if (leadz(i1) /= 0) call abort
64
  if (leadz(i2) /= 0) call abort
65
  if (leadz(i4) /= 0) call abort
66
  if (leadz(i8) /= 0) call abort
67
 
68
  if (trailz(i1) /= 2) call abort
69
  if (trailz(i2) /= 2) call abort
70
  if (trailz(i4) /= 2) call abort
71
  if (trailz(i8) /= 2) call abort
72
 
73
  if (leadz(-108_1) /= 0) call abort
74
  if (leadz(-108_2) /= 0) call abort
75
  if (leadz(-108_4) /= 0) call abort
76
  if (leadz(-108_8) /= 0) call abort
77
 
78
  if (trailz(-108_1) /= 2) call abort
79
  if (trailz(-108_2) /= 2) call abort
80
  if (trailz(-108_4) /= 2) call abort
81
  if (trailz(-108_8) /= 2) call abort
82
 
83
  i1 = 1
84
  i2 = 1
85
  i4 = 1
86
  i8 = 1
87
 
88
  if (leadz(i1) /= bit_size(i1) - 1) call abort
89
  if (leadz(i2) /= bit_size(i2) - 1) call abort
90
  if (leadz(i4) /= bit_size(i4) - 1) call abort
91
  if (leadz(i8) /= bit_size(i8) - 1) call abort
92
 
93
  if (trailz(i1) /= 0) call abort
94
  if (trailz(i2) /= 0) call abort
95
  if (trailz(i4) /= 0) call abort
96
  if (trailz(i8) /= 0) call abort
97
 
98
  if (leadz(1_1) /= bit_size(1_1) - 1) call abort
99
  if (leadz(1_2) /= bit_size(1_2) - 1) call abort
100
  if (leadz(1_4) /= bit_size(1_4) - 1) call abort
101
  if (leadz(1_8) /= bit_size(1_8) - 1) call abort
102
 
103
  if (trailz(1_1) /= 0) call abort
104
  if (trailz(1_2) /= 0) call abort
105
  if (trailz(1_4) /= 0) call abort
106
  if (trailz(1_8) /= 0) call abort
107
 
108
  i1 = 64
109
  i2 = 64
110
  i4 = 64
111
  i8 = 64
112
 
113
  if (leadz(i1) /= 1) call abort
114
  if (leadz(i2) /= 9) call abort
115
  if (leadz(i4) /= 25) call abort
116
  if (leadz(i8) /= 57) call abort
117
 
118
  if (trailz(i1) /= 6) call abort
119
  if (trailz(i2) /= 6) call abort
120
  if (trailz(i4) /= 6) call abort
121
  if (trailz(i8) /= 6) call abort
122
 
123
  if (leadz(64_1) /= 1) call abort
124
  if (leadz(64_2) /= 9) call abort
125
  if (leadz(64_4) /= 25) call abort
126
  if (leadz(64_8) /= 57) call abort
127
 
128
  if (trailz(64_1) /= 6) call abort
129
  if (trailz(64_2) /= 6) call abort
130
  if (trailz(64_4) /= 6) call abort
131
  if (trailz(64_8) /= 6) call abort
132
 
133
end

powered by: WebSVN 2.1.0

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