mirror of
https://github.com/golang/go
synced 2024-11-26 23:31:24 -07:00
0e02baa59a
This reverts commit c1dfbf72e1
.
Reason for revert: TESTL rule is wrong when the result is used for an ordered comparison.
Fixes #62360
Change-Id: I4d5b6aca24389b0a2bf767bfbc0a9d085359eb38
Reviewed-on: https://go-review.googlesource.com/c/go/+/524255
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
25 lines
414 B
Go
25 lines
414 B
Go
// run
|
|
|
|
// Copyright 2023 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
|
|
|
|
import (
|
|
"fmt"
|
|
"math/big"
|
|
)
|
|
|
|
//go:noinline
|
|
func f(x uint32) *big.Int {
|
|
return big.NewInt(int64(x))
|
|
}
|
|
func main() {
|
|
b := f(0xffffffff)
|
|
c := big.NewInt(0xffffffff)
|
|
if b.Cmp(c) != 0 {
|
|
panic(fmt.Sprintf("b:%x c:%x", b, c))
|
|
}
|
|
}
|