This is the mail archive of the
mailing list for the GCC project.
Re: Go patch committed: Size of int is now 64 bits on x86_64
On Tue, Nov 6, 2012 at 4:41 PM, Ian Lance Taylor <firstname.lastname@example.org> wrote:
> On Tue, Nov 6, 2012 at 4:32 PM, H.J. Lu <email@example.com> wrote:
>> On Tue, Nov 6, 2012 at 10:46 AM, Ian Lance Taylor <firstname.lastname@example.org> wrote:
>>> This patch to the Go compiler and library changes the size of the Go
>>> type "int" to be the same as the size of a pointer. This means that on
>>> x86_64 the size of int will be 64 bits. This matches the new behaviour
>>> of the other Go compiler, and is the intended implementation for the
>>> future Go 1.1 release. Bootstrapped and ran Go testsuite on
>>> x86_64-unknown-linux-gnu. Committed to mainline.
>> On x32, I saw
>> spawn -ignore SIGHUP
>> ./tmp.go -fno-diagnostics-show-caret
>> -w -O0 -g -fno-var-tracking-assignments
>> -lm -mx32 -o /export/build/gnu/gcc-x32-mx32-native/build-x86_64-linux/gcc/testsuite/go3/tmp.x^M
>> ./tmp.go:932:21: error: array index out of bounds^M
>> ./tmp.go:933:23: error: array index out of bounds^M
>> ./tmp.go:934:23: error: array index out of bounds^M
>> Is this expected?
> I assume this led to a test failure?
Yes. I got
FAIL: ./tmp.go compilation, -O0 -g -fno-var-tracking-assignments
> The Go library doesn't have proper support for x32 right now. I'm not
libgo works OK on x32 since x32 doesn't need much special treatment.
The above is the only Go regression on x32.