OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [fixedbugs/] [bug258.go] - Blame information for rev 858

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G $D/$F.go && $L $F.$A && ./$A.out
2
 
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
 
7
package main
8
 
9
import "math"
10
 
11
func f() float64 {
12
        math.Pow(2, 2)
13
        return 1
14
}
15
 
16
func 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.