summaryrefslogtreecommitdiffstats
path: root/src/cmd/compile/internal/ssa/testdata/infloop.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/testdata/infloop.go')
-rw-r--r--src/cmd/compile/internal/ssa/testdata/infloop.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/testdata/infloop.go b/src/cmd/compile/internal/ssa/testdata/infloop.go
new file mode 100644
index 0000000..cdb374f
--- /dev/null
+++ b/src/cmd/compile/internal/ssa/testdata/infloop.go
@@ -0,0 +1,16 @@
+package main
+
+var sink int
+
+//go:noinline
+func test() {
+ // This is for #30167, incorrect line numbers in an infinite loop
+ go func() {}()
+
+ for {
+ }
+}
+
+func main() {
+ test()
+}