compiler: handle int-to-string conversion with large integer constant

Currently, Type_conversion_expression::do_is_constant thinks the
int-to-string conversion is constant if the integer operand is
constant, but Type_conversion_expression::do_get_backend actually
generates a call to runtime.intstring if the integer does not fit
in a "ushort", which makes it not suitable in constant context,
such as static initializer.

This CL makes it handle all constant integer input as constant,
generating constant string.

Fixes golang/go#32347.

Change-Id: I64502e2fec034d5081be395ee7636791e5601215
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179777
Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 file changed