g++ 2.95.2 generates invalid `.line 0' directive on AIX 4.1.5.0

Alexandre Oliva oliva@lsd.ic.unicamp.br
Fri Dec 31 20:54:00 GMT 1999


On Dec  3, 1999, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:

> The exact error message is:

>         test x"yes" != xyes ||  /tmp/install-gnu-gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1-visconde-11094/libg++-2.8.1.3/gcc/xgcc -B/tmp/install-gnu-gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1-visconde-11094/libg++-2.8.1.3/gcc/ -B/n/gnu/gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1/powerpc-ibm-aix4.1.5.0/bin/ -c -g -O2 -fno-implicit-templates -I. -I. -nostdinc++   streambuf.cc -o pic/streambuf.o
> /tmp/ccJPpGNZ.s: Assembler messages:
> /tmp/ccJPpGNZ.s:1971: Error: Line numbers must be positive integers

> /tmp/ccJPpGNZ.s:1983: Error: Line numbers must be positive integers


> The problem is that gcc 2.95.2, configured --with-gnu-as
> --with-gnu-ld, is generating `.line 0' debugging directives.  


> It's most definitely a bug in gcc, since the code in
> gas/config/obj-coff.c says line 0 is used as an end marker.  


It seems that these directives are emitted for global constructors and
destructors.  Here is a snippet of the failing assembly file.  The
lines for which error messages are printed are exactly the `.line 0'
ones.  I don't know how much to quote, since I'm totally unfamiliar
with powerpc/rs6000 assembly.  Equivalent error messages are printed
for the same file, within each multilib.

.csect .data[RW],3
	.globl io_defs__
io_defs__:
	.space 1
.csect .text[PR]
.stabx "io_defs__:G421",io_defs__,128,0
.csect .data[RW],3
.csect .text[PR]
	.align 2
	.lglobl .__static_initialization_and_destruction_0
.csect __static_initialization_and_destruction_0[DS]
__static_initialization_and_destruction_0:
	.long .__static_initialization_and_destruction_0, TOC[tc0], 0
.csect .text[PR]
.__static_initialization_and_destruction_0:
.stabx "__static_initialization_and_destruction_0:f-11",.__static_initialization_and_destruction_0,142,0
	.function .__static_initialization_and_destruction_0,.__static_initialization_and_destruction_0,16,044,FE..__static_initialization_and_destruction_0-.__static_initialization_and_destruction_0
	.bf	364
.stabx "__initialize_p:R-1",3,132,0
.stabx "__priority:R-1",4,132,0
	.line	1
	mflr 0
	stw 0,8(1)
	stwu 1,-56(1)
	li 0,0
	ori 0,0,65535
	cmpw 0,4,0
	bc 4,2,L..285
	cmpwi 0,3,0
	bc 4,2,L..285
	.line	0                                       (line 1971)
	.bb	0
	.eb	0
	.bi	"streambuf.cc"
	.line	361
	.bb	361
	.bb	361
	.eb	361
	bl ._IO_cleanup
	cror 31,31,31
	.eb	361
	.ei	"streambuf.cc"
	.line	0                                       (line 1983)
L..285:
	.ef	364
	la 1,56(1)
	lwz 0,8(1)
	mtlr 0
	blr
LT..__static_initialization_and_destruction_0:
	.long 0
	.byte 0,9,32,65,128,0,2,0
	.long 0
	.long LT..__static_initialization_and_destruction_0-.__static_initialization_and_destruction_0
	.short 41
	.byte "__static_initialization_and_destruction_0"
FE..__static_initialization_and_destruction_0:
.comm __ti3ios,12,3
.stabx "__ti3ios:G430=ar-1;0;11;-5",__ti3ios,128,0
.csect _streambuf.rw_cc[RO],3
	.align 2
LC..7:
	.byte "3ios"
	.byte 0
.comm __ti9streambuf,12,3
.csect .text[PR]
.stabx "__ti9streambuf:G430",__ti9streambuf,128,0
.csect .data[RW],3
.csect _streambuf.rw_cc[RO],3
	.align 2
LC..11:
	.byte "9streambuf"
	.byte 0
.comm __ti7filebuf,12,3

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them



More information about the Gcc-bugs mailing list