Subject: toolchain/15272: sparc64 -m32 compiler cannot handle 64-bit constants
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/16/2002 18:05:53
>Number:         15272
>Category:       toolchain
>Synopsis:       sparc64 -m32 compiler cannot handle 64-bit constants
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 16 18:06:00 PST 2002
>Originator:     Eduardo Horvath
>Release:        1.5ZA
Wasabi Systems
NetBSD 1.5ZA NetBSD 1.5ZA (PLUS) #1: Thu Jan 10 13:46:52 PST 2002 sparc64

Trying to generate 32-bit SPARC object files on a sparc64 machine with the  sparc64 compiler's -m32 flag or a cross compiler built from the source tree results in corrupted 64-bit `long long' constants.
Get some sort of compiler that generates 32-bit SPARC code and compile:

int foo() {
     long long l = 0x1000000000000000LL;

     printf("%llx\n", l);