summaryrefslogtreecommitdiffstats
path: root/src/cmd/compile/internal/ssa/testdata/i22600.go
blob: 27f0d3d565f8694821b7054d9cd4ac6d03a2726a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

import (
	"fmt"
	"os"
)

func test() {
	pwd, err := os.Getwd()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	fmt.Println(pwd)
}

func main() {
	growstack() // Use stack early to prevent growth during test, which confuses gdb
	test()
}

var snk string

//go:noinline
func growstack() {
	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
}