mirror of
https://github.com/golang/go
synced 2024-11-25 14:57:57 -07:00
83e288f3db
Missed as part of CL 221790. It isn't just * and / that can make NaNs. Update #36400 Fixes #38359 Change-Id: I3fa562f772fe03b510793a6dc0cf6189c0c3e652 Reviewed-on: https://go-review.googlesource.com/c/go/+/227860 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
20 lines
318 B
Go
20 lines
318 B
Go
// compile
|
|
|
|
// 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.
|
|
|
|
// Make sure NaN-NaN compiles correctly.
|
|
|
|
package p
|
|
|
|
func f() {
|
|
var st struct {
|
|
f float64
|
|
_, _ string
|
|
}
|
|
|
|
f := 1e308
|
|
st.f = 2*f - 2*f
|
|
}
|