diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index 05a049b3cc5f19042b4a14c27fc99dfe1378153e..9df288ea653831b1ef59855310fca60ec260221a 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -3881,6 +3881,16 @@ func wrapCall(n *Node, init *Nodes) *Node {
 	}
 
 	isBuiltinCall := n.Op != OCALLFUNC && n.Op != OCALLMETH && n.Op != OCALLINTER
+
+	// Turn f(a, b, []T{c, d, e}...) back into f(a, b, c, d, e).
+	if !isBuiltinCall && n.IsDDD() {
+		last := n.List.Len() - 1
+		if va := n.List.Index(last); va.Op == OSLICELIT {
+			n.List.Set(append(n.List.Slice()[:last], va.List.Slice()...))
+			n.SetIsDDD(false)
+		}
+	}
+
 	// origArgs keeps track of what argument is uintptr-unsafe/unsafe-uintptr conversion.
 	origArgs := make([]*Node, n.List.Len())
 	t := nod(OTFUNC, nil, nil)
diff --git a/test/fixedbugs/issue24491a.go b/test/fixedbugs/issue24491a.go
index 3c595798b58479b4031faa29858c8e546fca494f..8accf8c0a376f0dca01e860560a1b2244c2f62e1 100644
--- a/test/fixedbugs/issue24491a.go
+++ b/test/fixedbugs/issue24491a.go
@@ -34,9 +34,6 @@ func test(s string, p, q uintptr, rest ...uintptr) int {
 		panic(s + ": q failed")
 	}
 	for _, r := range rest {
-		// TODO(mdempsky): Remove.
-		break
-
 		if *(*string)(unsafe.Pointer(r)) != "ok" {
 			panic(s + ": r[i] failed")
 		}