blob: db1af3eaa3839b7c1f03fc994df6c33468219cca [file] [log] [blame]
Rémy Oudompheng2ece2f52012-02-18 22:15:42 +01001// run
Anthony Martinf570d9d2011-05-16 22:14:56 -04002
3// Copyright 2011 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// Used to panic because 8g was generating incorrect
8// code for converting a negative float to a uint64.
9
10package main
11
12func main() {
13 var x float32 = -2.5
14
15 _ = uint64(x)
16 _ = float32(0)
17}
18/*
19panic: runtime error: floating point error
20
21[signal 0x8 code=0x6 addr=0x8048c64 pc=0x8048c64]
22*/