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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [fixedbugs/] [bug253.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: bug253
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
type S1 struct {
10
        i int
11
}
12
type S2 struct {
13
        i int
14
}
15
type S3 struct {
16
        S1
17
        S2
18
}
19
type S4 struct {
20
        S3
21
        S1
22
}
23
 
24
func main() {
25
        var s4 S4
26
        if s4.i != 0 { // .i refers to s4.S1.i, unambiguously
27
                panic("fail")
28
        }
29
}

powered by: WebSVN 2.1.0

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