github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/compile/ssa/testdata/infloop.go (about)

     1  package main
     2  
     3  var sink int
     4  
     5  //go:noinline
     6  func test() {
     7  	// This is for #30167, incorrect line numbers in an infinite loop
     8  	go func() {}()
     9  
    10  	for {
    11  	}
    12  }
    13  
    14  func main() {
    15  	test()
    16  }