compiler: don't error for goto over type or const declaration

We should only issue an error for a goto over a var declaration.

The test case for this is already in the master repository, at
test/fixedbugs/issue8042.go.  It just hasn't been copied into the
gccgo repository yet.

Fixes golang/go#19089

Change-Id: I2868b2d01026b61fd700005b332fbf453bb946bf
Reviewed-on: https://go-review.googlesource.com/91696
Reviewed-by: Than McIntosh <thanm@google.com>
1 file changed