Source file
test/fixedbugs/issue43099.go
1
2
3
4
5
6
7
8
9
10
11 package p
12
13 func f() {
14 var i int
15 var s string
16 for i > 0 {
17 _ = s[0]
18 i++
19 }
20
21 var c chan int
22 c <- 1 % i
23 }
24
25 func f32() uint32 {
26 s := "\x00\x00\x00\x00"
27 c := uint32(s[0]) | uint32(s[1])<<8 | uint32(s[2])<<16 | uint32(s[3])<<24
28 return 1 / c
29 }
30 func f64() uint64 {
31 s := "\x00\x00\x00\x00\x00\x00\x00\x00"
32 c := uint64(s[0]) | uint64(s[1])<<8 | uint64(s[2])<<16 | uint64(s[3])<<24 | uint64(s[4])<<32 | uint64(s[5])<<40 | uint64(s[6])<<48 | uint64(s[7])<<56
33 return 1 / c
34 }
35
View as plain text