http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48922
Summary: invalid dwarf2 on ia64 with very old gas Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: phhargr...@lbl.gov I recently built gcc-4.6.0 on an SGI Altix (ia64-unknown-linux-gnu) which has a very old binutils: $ as --version GNU assembler 2.15.90.0.1.1 20040303 (SuSE Linux) Copyright 2002 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `ia64-suse-linux'. This assembler is warning thousands of times on the .s files generated by gcc-4.6.0. There are two distinct warnings seen: /tmp/ccDiWUIH.s:343: Warning: rest of line ignored; first ignored character is `i' /tmp/ccDiWUIH.s:705: Warning: rest of line ignored; first ignored character is `d' I traced these to the '.loc' lines in the .s file(s) and was able to "fix" the problem in my build with the following brute-force approach: --- gcc-4.6.0/gcc/dwarf2out.c.orig 2011-05-06 23:07:15.987896522 -0400 +++ gcc-4.6.0/gcc/dwarf2out.c 2011-05-06 22:49:28.496973178 -0400 @@ -22023,6 +22023,7 @@ { /* Emit the .loc directive understood by GNU as. */ fprintf (asm_out_file, "\t.loc %d %d 0", file_num, line); +#if 0 if (is_stmt != last_is_stmt) { fprintf (asm_out_file, " is_stmt %d", is_stmt ? 1 : 0); @@ -22030,6 +22031,7 @@ } if (SUPPORTS_DISCRIMINATOR && discriminator != 0) fprintf (asm_out_file, " discriminator %d", discriminator); +#endif fputc ('\n', asm_out_file); /* Indicate that line number info exists. */ I know this is NOT the proper approach, but I am not familiar enough w/ gcc internals for a proper fix. I suppose one should be doing a configure-time check for the assembler's support for "is_stmt" and "discriminator". Of course, I suspect installing a more recent binutils is a "better" fix, but my approach above was faster for my purposes.