public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: gas crashes on IRIX 5.2
       [not found] <19991203173931.A75DB1B493@ocean.lucon.org>
@ 1999-12-03 10:17 ` Alexandre Oliva
  1999-12-03 11:26   ` AIX 4.1.5.0's gas chokes on g++ 2.95.2's non-positive .lines Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 1999-12-03 10:17 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils, gcc-bugs

On Dec  3, 1999, hjl@lucon.org (H.J. Lu) wrote:

>> FYI, there may be something wrong on AIX4.1.5.0/rs6000's assembler of
>> release 2.9.5.0.21, that isn't wrong in binutils CVS.

> I didn't touch anything in PPC. Please try 2.9.5.0.22. The bug
> may be fixed from the CVS update.

Nope, I spoke too soon.  The bug has just come up with CVS binutils
too :-(

> If you can send me the asm code and tell me how to configure the
> cross assembler, I will fix it.

Thanks, but it won't build as a cross toolchain :-(

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.  The
following patch causes gas to accept `.line 0', as does the native
assembler:

^ permalink raw reply	[flat|nested] 2+ messages in thread

* AIX 4.1.5.0's gas chokes on g++ 2.95.2's non-positive .lines
  1999-12-03 10:17 ` gas crashes on IRIX 5.2 Alexandre Oliva
@ 1999-12-03 11:26   ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 1999-12-03 11:26 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils, gcc-bugs

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

> /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

> 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.  The
> following patch causes gas to accept `.line 0', as does the native
> assembler:

It turned out that g++ would also generate *negative* line numbers,
for example, when generating libstdc++/cstrmain.o.  Since the native
assembler also silently accepts such negative line numbers, here's a
revised patch that supersedes the previous one:

Index: gas/ChangeLog
from  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
	
	* config/obj-coff.c (add_lineno): Accept non-positive lineno with
	warning, and bump it to 1.
	
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/obj-coff.c,v
retrieving revision 1.19
diff -u -r1.19 obj-coff.c
--- gas/config/obj-coff.c	1999/09/12 03:44:41	1.19
+++ gas/config/obj-coff.c	1999/12/03 19:16:50
@@ -441,8 +441,8 @@
   if (num <= 0) 
     {
       /* Zero is used as an end marker in the file.  */
-      as_bad (_("Line numbers must be positive integers\n"));
-      return;
+      as_warn (_("Line numbers must be positive integers\n"));
+      num = 1;
     }
   new_line->next = line_nos;
   new_line->frag = frag;

-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-12-03 11:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <19991203173931.A75DB1B493@ocean.lucon.org>
1999-12-03 10:17 ` gas crashes on IRIX 5.2 Alexandre Oliva
1999-12-03 11:26   ` AIX 4.1.5.0's gas chokes on g++ 2.95.2's non-positive .lines Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).