blob: d362e5a69739a8a771335c74514ea27bfa0f3ca6 [file] [log] [blame]
Russ Cox80803842012-02-16 23:49:59 -05001// run
Russ Coxfb550662010-02-17 15:28:45 -08002
3// Copyright 2010 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
7package main
8
9import "math"
10
11func f() float64 {
12 math.Pow(2, 2)
13 return 1
14}
15
16func main() {
17 for i := 0; i < 10; i++ {
18 // 386 float register bug used to load constant before call
19 if -5 < f() {
20 } else {
21 println("BUG 1")
22 return
23 }
24 if f() > -7 {
25 } else {
26 println("BUG 2")
27 }
28
29 if math.Pow(2, 3) != 8 {
30 println("BUG 3")
31 }
32 }
33}