1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
// run
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main() {
ff := []func(){lt_f1, lt_f2, lt_f3, lt_f4, lt_f5, lt_f6, lt_f7, lt_f8, lt_f9,
gt_f1, gt_f2, gt_f3, le_f1, le_f2, le_f3, ge_f1, ge_f2, ge_f3}
for _, f := range ff {
f()
}
}
func lt_f1() {
const c = 1
var a = 0
var v *int = &a
if *v-c < len([]int{}) {
} else {
panic("bad")
}
}
func lt_f2() {
const c = 10
var a = 0
var v *int = &a
if *v+c < len([]int{}) {
panic("bad")
}
}
func lt_f3() {
const c = -10
var a = 0
var v *int = &a
if *v|0xff+c < len([]int{}) {
panic("bad")
}
}
func lt_f4() {
const c = 10
var a = 0
var v *int = &a
if *v|0x0f+c < len([]int{}) {
panic("bad")
}
}
func lt_f5() {
const c int32 = 1
var a int32 = 0
var v *int32 = &a
if *v-c < int32(len([]int32{})) {
} else {
panic("bad")
}
}
func lt_f6() {
const c int32 = 10
var a int32 = 0
var v *int32 = &a
if *v+c < int32(len([]int32{})) {
panic("bad")
}
}
func lt_f7() {
const c int32 = -10
var a int32 = 0
var v *int32 = &a
if *v|0xff+c < int32(len([]int{})) {
panic("bad")
}
}
func lt_f8() {
const c int32 = 10
var a int32 = 0
var v *int32 = &a
if *v|0x0f+c < int32(len([]int{})) {
panic("bad")
}
}
func lt_f9() {
const c int32 = -10
var a int32 = 0
var v *int32 = &a
if *v|0x0a+c < int32(len([]int{})) {
panic("bad")
}
}
func gt_f1() {
const c = 1
var a = 0
var v *int = &a
if len([]int{}) > *v-c {
} else {
panic("bad")
}
}
func gt_f2() {
const c = 10
var a = 0
var v *int = &a
if len([]int{}) > *v|0x0f+c {
panic("bad")
}
}
func gt_f3() {
const c int32 = 10
var a int32 = 0
var v *int32 = &a
if int32(len([]int{})) > *v|0x0f+c {
panic("bad")
}
}
func le_f1() {
const c = -10
var a = 0
var v *int = &a
if *v|0xff+c <= len([]int{}) {
panic("bad")
}
}
func le_f2() {
const c = 0xf
var a = 0
var v *int = &a
if *v|0xf-c <= len([]int{}) {
} else {
panic("bad")
}
}
func le_f3() {
const c int32 = -10
var a int32 = 0
var v *int32 = &a
if *v|0xff+c <= int32(len([]int{})) {
panic("bad")
}
}
func ge_f1() {
const c = -10
var a = 0
var v *int = &a
if len([]int{}) >= *v|0xff+c {
panic("bad")
}
}
func ge_f2() {
const c int32 = 10
var a int32 = 0
var v *int32 = &a
if int32(len([]int{})) >= *v|0x0f+c {
panic("bad")
}
}
func ge_f3() {
const c = -10
var a = 0
var v *int = &a
if len([]int{}) >= *v|0x0a+c {
} else {
panic("bad")
}
}
|