test: add test that caused gccgo to crash on valid code

Update issue 8612

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/135170043