compiler: correct condition for calling memclrHasPointers
authorIan Lance Taylor <iant@golang.org>
Sat, 21 Aug 2021 19:42:19 +0000 (12:42 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 10 Sep 2021 18:14:06 +0000 (11:14 -0700)
commitb7f84702b364d49824ca97d4a2fc01567301d784
treed3d0809da1b2361e41cdd8697190beb9b8b72802
parent01b5038718056b024b370b74a874fbd92c5bbab3
compiler: correct condition for calling memclrHasPointers

When compiling append(s, make([]typ, ln)...), where typ has a pointer,
and the append fits within the existing capacity of s, the condition
used to clear out the new elements was reversed.

Fixes golang/go#47771

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/344189
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc