This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.3.1; HP-UX B.10.20; Make 3.80: You do the math
- From: "Mario Nigrovic; RVVK40" <Mario dot Nigrovic at Motorola dot com>
- To: gcc-help at gcc dot gnu dot org
- Cc: Mario Nigrovic <mario at nigrovic dot net>
- Date: Fri, 24 Oct 2003 08:40:56 -0700
- Subject: Re: GCC 3.3.1; HP-UX B.10.20; Make 3.80: You do the math
- References: <200310240426.h9O4Qs8g004556@speedy.slc.redhat.com>
law@redhat.com wrote:
In message <3F98A241.6060809@nigrovic.net>, Mario Nigrovic writes:
>/var/tmp//cc1asr4R.s: Assembler messages:
>/var/tmp//cc1asr4R.s:641: Error: bad expression
>/var/tmp//cc1asr4R.s:641: Warning: rest of line ignored; first ignored charac
>ter is `g'
It looks like something in GCC is forgetting to strip out the '*' at the
start of a variable name ('*' at the start of a name has special meaning to
gcc and it needs to be stripped before the name can be put into an assembler
file (STRIP_NAME_ENCODING).
Jeff
Someone (who shall remain nameless since he replied off-list ;-) suggested
maybe sed. Unfortunately, putting in sed-4.0.7 didn't fix my problem.
So I decided to try and compare the glob.s files from Solaris and HP-UX.
Here are the snipits around the definition of glob64:
Solaris 5.8:
.asciz "."
.section ".text"
.align 4
.stabs "*glob64:F(0,1)",36,0,368,glob64
.stabs "pattern:P(1,1)=*(1,2)=k(0,2)",64,0,364,19
.stabs "flags:P(0,1)",64,0,365,25
.stabs "errfunc:P(1,3)=*(1,4)=f(0,1)",64,0,366,26
.stabs "pglob:P(1,5)=*(37,2)",64,0,367,27
.global glob64
.type glob64, #function
.proc 04
glob64:
.stabn 68,0,368,.LLM1-glob64
.LLM1:
!#PROLOGUE# 0
save %sp, -320, %sp
!#PROLOGUE# 1
.stabn 68,0,375,.LLM2-glob64
.LLM2:
.LLBB2:
subcc %g0, %i0, %g0
subx %g0, -1, %o5
subcc %g0, %i3, %g0
.stabn 68,0,375,.LLM3-glob64
.LLM3:
HP-UX B.10.20:
.word P%collated_compare
.SPACE $TEXT$
.SUBSPA $CODE$
.align 4
.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
.stabs "*glob64:F1",36,0,368,glob64
.stabs "pattern:P150",64,0,364,8
.stabs "flags:P1",64,0,365,10
.stabs "errfunc:P293=*294=f1",64,0,366,16
.stabs "pglob:P295=*281",64,0,367,13
.EXPORT glob64,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
.stabs "/media/gnu/make-3.80/glob/glob.c",132,0,0,L$text0005
L$text0005
.stabn 68,0,368,0
glob64
.PROC
.CALLINFO FRAME=320,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=18
.ENTRY
stw %r2,-20(%r30)
copy %r3,%r1
.stabn 68,0,375,L$M17-*glob64
L$M17:
L$BB0011
comiclr,= 0,%r23,%r0
comiclr,<> 0,%r26,%r19
ldi 1,%r19
.stabn 68,0,368,L$M18-*glob64
L$M18:
The more I looked at this, the more it seemed like all that stabn and stabs stuff
was for -g debugging, so I tried recompiling "make" with 'make CFLAGS="-O2"' and
it worked. But that seems to imply something buggy in GCC itself.
Should I go over and report this or is someone already watching this list for
compiler bugs?
-- Mario