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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [fixedbugs/] [bug343.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: bug343
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 1900
8
 
9
package main
10
 
11
func getArgs(data map[string]interface{}, keys ...string) map[string]string {
12
       ret := map[string]string{}
13
       var ok bool
14
       for _, k := range keys {
15
               ret[k], ok = data[k].(string)
16
               if !ok {}
17
       }
18
       return ret
19
}
20
 
21
func main() {
22
        x := getArgs(map[string]interface{}{"x":"y"}, "x")
23
        if x["x"] != "y" {
24
                println("BUG bug343", x)
25
        }
26
}
27
 
28
 
29
/*
30
typecheck [1008592b0]
31
.   INDREG a(1) l(15) x(24) tc(2) runtime.ret G0 string
32
bug343.go:15: internal compiler error: typecheck INDREG
33
*/

powered by: WebSVN 2.1.0

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