diff options
author | Keith Randall <khr@golang.org> | 2020-11-20 13:59:29 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2020-11-21 16:46:05 +0000 |
commit | 9ea6364a5e9f776af36604c2c20501e6d07f8467 (patch) | |
tree | e6fcb4e5016586d6d9668ae4005a101925674657 /test | |
parent | f7342596daa892400e91a407cac5843bc43dcdd0 (diff) | |
download | go-9ea6364a5e9f776af36604c2c20501e6d07f8467.tar.gz go-9ea6364a5e9f776af36604c2c20501e6d07f8467.zip |
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 <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/issue42753.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/fixedbugs/issue42753.go b/test/fixedbugs/issue42753.go new file mode 100644 index 0000000000..a998d1d3b3 --- /dev/null +++ b/test/fixedbugs/issue42753.go @@ -0,0 +1,13 @@ +// compile -d=ssa/check/on + +// 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 f() uint32 { + s := "\x01" + x := -int32(s[0]) + return uint32(x) & 0x7fffffff +} |