1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:41:23 -07:00

test: add a test that causes gccgo to get a failure at link time

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13788043
This commit is contained in:
Ian Lance Taylor 2013-09-19 15:20:39 -07:00
parent 3378f2473c
commit 1325732ab9
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package p
import "unsafe"
type S2 struct {}
const C = unsafe.Sizeof(S2{})
type S1 struct {
S2
}

View File

@ -0,0 +1,16 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "./a"
type S3 struct {
p.S1
}
func main() {
var i interface{} = S3{}
_ = i
}

10
test/fixedbugs/bug479.go Normal file
View File

@ -0,0 +1,10 @@
// rundir
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Gccgo was not consistent in deciding how to compare a struct type
// for equality, leading to an undefined symbol at link time.
package ignored