mirror of
https://github.com/golang/go
synced 2024-11-26 18:26:48 -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:
parent
3378f2473c
commit
1325732ab9
15
test/fixedbugs/bug479.dir/a.go
Normal file
15
test/fixedbugs/bug479.dir/a.go
Normal 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
|
||||
}
|
16
test/fixedbugs/bug479.dir/b.go
Normal file
16
test/fixedbugs/bug479.dir/b.go
Normal 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
10
test/fixedbugs/bug479.go
Normal 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
|
Loading…
Reference in New Issue
Block a user