]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/fixedbugs/issue60982.go
cmd/compile/internal/ssagen: fix min/max codegen, again
[gostls13.git] / test / fixedbugs / issue60982.go
index 11c3af214f201d30631c0199bfa5187e1a550f5f..4e5fc34646f756dc16aafba8e2409385a4761e61 100644 (file)
@@ -6,8 +6,13 @@
 
 package main
 
-func f(x int) int {
+func f(x int, b bool) int {
        if x >= 1000 {
+               if b { // from #61041
+                       var a struct{ f int64 }
+                       _ = max(0, a.f)
+               }
+
                return max(x, 2000)
        }
        // generate 1000 basic blocks to put this function