[RFC] Fix PR target/20301
Eric Botcazou
ebotcazou@libertysurf.fr
Mon Jun 6 15:39:00 GMT 2005
Hi,
The submitter of this PR managed to cause the compiler to emit labels with
negative index numbers (big jar file, >= 2^31 labels) on SPARC/Solaris.
The problem stems from:
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
on Solaris. A quick grep shows that most macros use the signed version, while
the others do use the unsigned one which seems more correct to me. Any
specific reason for the discrepancy?
Tested SPARC/Solaris 2.5.1 up to 10.
2005-06-06 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/20301
* config/sparc/sol2.h (ASM_GENERATE_INTERNAL_LABEL): Emit
unsigned index numbers.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20301.diff
Type: text/x-diff
Size: 674 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050606/7a336562/attachment.bin>
More information about the Gcc-patches
mailing list