Revert "[PATCH 7/7] RISC-V: Disable by pieces for vector setmem length > UNITS_PER_WORD"
[official-gcc.git] / libgo / go / runtime / float_test.go
blobb2aa43da5970856262d54c6f0ba22618bf7927a8
1 // Copyright 2021 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package runtime_test
7 import (
8 "testing"
11 func TestIssue48807(t *testing.T) {
12 for _, i := range []uint64{
13 0x8234508000000001, // from issue48807
14 1<<56 + 1<<32 + 1,
15 } {
16 got := float32(i)
17 dontwant := float32(float64(i))
18 if got == dontwant {
19 // The test cases above should be uint64s such that
20 // this equality doesn't hold. These examples trigger
21 // the case where using an intermediate float64 doesn't work.
22 t.Errorf("direct float32 conversion doesn't work: arg=%x got=%x dontwant=%x", i, got, dontwant)