At the same time, perform a number of simplifications: - Rename go.tools directory to gotools. - Import only the go directory; all required Go analysis code and its dependencies have now been moved to this directory. llvm-svn: 225825
24 lines
308 B
Go
24 lines
308 B
Go
//+build ignore
|
|
|
|
package main
|
|
|
|
// Test of dynamic function calls; no interfaces.
|
|
|
|
func A(int) {}
|
|
|
|
var (
|
|
B = func(int) {}
|
|
C = func(int) {}
|
|
)
|
|
|
|
func f() {
|
|
pfn := B
|
|
pfn(0) // calls A, B, C, even though A is not even address-taken
|
|
}
|
|
|
|
// WANT:
|
|
// Dynamic calls
|
|
// f --> A
|
|
// f --> init$1
|
|
// f --> init$2
|