Source file src/cmd/compile/internal/ssa/testdata/i22600.go

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"os"
     6  )
     7  
     8  func test() {
     9  	pwd, err := os.Getwd()
    10  	if err != nil {
    11  		fmt.Println(err)
    12  		os.Exit(1)
    13  	}
    14  	fmt.Println(pwd)
    15  }
    16  
    17  func main() {
    18  	growstack() // Use stack early to prevent growth during test, which confuses gdb
    19  	test()
    20  }
    21  
    22  var snk string
    23  
    24  //go:noinline
    25  func growstack() {
    26  	snk = fmt.Sprintf("%#v,%#v,%#v", 1, true, "cat")
    27  }
    28  

View as plain text