mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
test: add testcase for gccgo compiler buglet
New test containing code that caused a gccgo compiler failure. Updates #34503. Change-Id: Id895a1e1249062b7fb147e54bcaa657e774ed0d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/197217 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
e0dde990de
commit
fad0a14d92
15
test/fixedbugs/issue34503.dir/a.go
Normal file
15
test/fixedbugs/issue34503.dir/a.go
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2019 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 a
|
||||
|
||||
import "unsafe"
|
||||
|
||||
type HookFunc func(x uint64)
|
||||
|
||||
var HookV unsafe.Pointer
|
||||
|
||||
func Hook(x uint64) {
|
||||
(*(*HookFunc)(HookV))(x)
|
||||
}
|
11
test/fixedbugs/issue34503.dir/b.go
Normal file
11
test/fixedbugs/issue34503.dir/b.go
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2019 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 b
|
||||
|
||||
import "a"
|
||||
|
||||
func Bfunc() {
|
||||
a.Hook(101)
|
||||
}
|
9
test/fixedbugs/issue34503.go
Normal file
9
test/fixedbugs/issue34503.go
Normal file
@ -0,0 +1,9 @@
|
||||
// compiledir
|
||||
|
||||
// Copyright 2019 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.
|
||||
|
||||
// Issue 34503: gccgo compiler error importing inlinable function
|
||||
|
||||
package ignored
|
Loading…
x
Reference in New Issue
Block a user