compiler, runtime: check len/cap for append(s, make(T, l)...)

The overflow checks done in growslice always reported an error for the
capacity argument, even if it was the length argument that overflowed.
This change lets the code pass the current issue4085b.go test.

Change-Id: Ib531d4675e732cdec9eac4317104d6b8ba4cfbad
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273806
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
3 files changed