* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / testsuite / go.go-torture / execute / printnil.go
blob9b72dd4736455002346df386d464ff04388ffe3e
1 // printnil checks that fmt correctly handles a nil pointer receiver
2 // for a value method at all optimization levels.
3 package main
5 import "fmt"
7 type MyType struct {
8 val int
11 func (t MyType) String() string {
12 return "foobar"
15 func main() {
16 if got := fmt.Sprintf("%s", (*MyType)(nil)); got != "<nil>" {
17 panic(got)