Skip to content

Commit 9ea6364

Browse files
committed
cmd/compile: add test for 42753
This issue was already fixed at tip. Just adding the test that failed on 1.14/1.15. Update #42753 Change-Id: I00d13ade476b9c17190d762d7fdcb30cf6c83954 Reviewed-on: https://go-review.googlesource.com/c/go/+/272029 Trust: Keith Randall <[email protected]> Run-TryBot: Keith Randall <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent f734259 commit 9ea6364

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/fixedbugs/issue42753.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// compile -d=ssa/check/on
2+
3+
// Copyright 2020 The Go Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style
5+
// license that can be found in the LICENSE file.
6+
7+
package main
8+
9+
func f() uint32 {
10+
s := "\x01"
11+
x := -int32(s[0])
12+
return uint32(x) & 0x7fffffff
13+
}

0 commit comments

Comments
 (0)