Bug 20301 - Assembler labels have a leading "-"
Summary: Assembler labels have a leading "-"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.1
Assignee: Eric Botcazou
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2005-03-03 17:23 UTC by steve
Modified: 2005-06-14 13:18 UTC (History)
3 users (show)

See Also:
Host: sparc-sun-solaris2.8
Target: sparc-sun-solaris2.8
Build: sparc-sun-solaris2.8
Known to work:
Known to fail:
Last reconfirmed: 2005-05-31 16:32:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steve 2005-03-03 17:23:06 UTC
I am compiling a large jar file.

/opt/gcc-3.4.3-cvs/bin/gcj -c ../../kernel/kernel.jar --classpath=..:../kernel
-o kernel.o
/var/tmp//cct7Jptt.s: Assembler messages:
/var/tmp//cct7Jptt.s:103992: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:143015: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:169767: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:169775: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:179941: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:208865: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:225045: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:230975: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:231045: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:232434: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:232840: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:234117: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:235266: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:239572: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:240134: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:241111: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:243455: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:243858: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:246766: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:264795: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:272843: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:274270: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:276426: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:277635: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:278726: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:279508: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:296087: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:296150: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:296234: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:306372: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:406839: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:436738: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:530831: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:568280: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:582599: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:594217: Error: unknown pseudo-op: `.ll'
/var/tmp//cct7Jptt.s:652229: Error: unknown pseudo-op: `.ll'
make[2]: *** [kernel.o] Error 1
make[1]: *** [kernel.o] Error 2
make: *** [_SunOS_5.8_sparc] Error 2

The resulting *.s file has labels that contain "-" which causes as to fail.
If I hand remove the "-" from the .s file it compiles.

Here is a snipet of the resulting *.s code with the problem
.LLEHE635:
        restore
        jmp     %o7+8
         nop
        .align 4
        .align 4
.LL-1347440721:
        .word   .LL7725
        .word   .LL7697
        .word   .LL7726
        .word   .LL7727
        .word   .LL7728
        .word   .LL7729


I looks like the emitter has an int for the label counter instead of a uint.

[steve@helios are]$ gcc -v
Using built-in specs.
Configured with: ../configure --prefix=/opt/gcc-3.4.3-cvs --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 4.0.0 20050120 (experimental)
[steve@helios are]$ gcj -v
Using built-in specs.
Reading specs from
/NetFuel/compilers/solaris-sparc-2.8/gcc-3.4.3-cvs/bin/../lib/gcc/sparc-sun-solaris2.8/4.0.0/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../configure --prefix=/opt/gcc-3.4.3-cvs --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 4.0.0 20050120 (experimental)
Comment 1 Eric Botcazou 2005-04-15 22:07:24 UTC
Confirmed, there is indeed a suspicious cast in the way.
Comment 2 Eric Botcazou 2005-04-15 22:09:05 UTC
Recategorizing for now.
Comment 3 Eric Botcazou 2005-05-31 16:32:34 UTC
Investigating.
Comment 4 CVS Commits 2005-06-14 13:08:03 UTC
Subject: Bug 20301

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2005-06-14 13:07:43

Modified files:
	gcc            : ChangeLog 
	gcc/config/sparc: sol2.h 

Log message:
	PR target/20301
	* config/sparc/sol2.h (ASM_GENERATE_INTERNAL_LABEL): Emit
	unsigned index numbers.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9143&r2=2.9144
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2.h.diff?cvsroot=gcc&r1=1.72&r2=1.73

Comment 5 CVS Commits 2005-06-14 13:12:33 UTC
Subject: Bug 20301

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	ebotcazou@gcc.gnu.org	2005-06-14 13:12:01

Modified files:
	gcc            : ChangeLog 
	gcc/config/sparc: sol2.h 

Log message:
	PR target/20301
	* config/sparc/sol2.h (ASM_GENERATE_INTERNAL_LABEL): Emit
	unsigned index numbers.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.286&r2=2.7592.2.287
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.69.8.2&r2=1.69.8.3

Comment 6 CVS Commits 2005-06-14 13:15:12 UTC
Subject: Bug 20301

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	ebotcazou@gcc.gnu.org	2005-06-14 13:15:02

Modified files:
	gcc            : ChangeLog 
	gcc/config/sparc: sol2.h 

Log message:
	PR target/20301
	* config/sparc/sol2.h (ASM_GENERATE_INTERNAL_LABEL): Emit
	unsigned index numbers.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.877&r2=2.2326.2.878
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.57.4.5&r2=1.57.4.6

Comment 7 Eric Botcazou 2005-06-14 13:18:56 UTC
I guess index number overflow is looming, but still.