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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug344
2
 
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
// issue 1808
8
 
9
package main
10
 
11
func main() {
12
        var i uint64
13
        var x int = 12345
14
 
15
        if y := x << (i&5); y != 12345<<0 {
16
                println("BUG bug344", y)
17
                return
18
        }
19
 
20
        i++
21
        if y := x << (i&5); y != 12345<<1 {
22
                println("BUG bug344a", y)
23
        }
24
 
25
        i = 70
26
        if y := x << i; y != 0 {
27
                println("BUG bug344b", y)
28
        }
29
 
30
        i = 1<<32
31
        if y := x << i; y != 0 {
32
                println("BUG bug344c", y)
33
        }
34
}
35
 
36
 
37
/*
38
typecheck [1008592b0]
39
.   INDREG a(1) l(15) x(24) tc(2) runtime.ret G0 string
40
bug343.go:15: internal compiler error: typecheck INDREG
41
*/

powered by: WebSVN 2.1.0

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