public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
@ 2003-10-24 16:56 mario dot nigrovic at motorola dot com
  2003-10-24 17:01 ` [Bug target/12764] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mario dot nigrovic at motorola dot com @ 2003-10-24 16:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764

           Summary: gcc -g option leaves asterisk (*) on some names to
                    assembler on HP-UX B.10.20
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mario dot nigrovic at motorola dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa2.0-hp-hpux10.20
  GCC host triplet: hppa2.0-hp-hpux10.20
GCC target triplet: hppa2.0-hp-hpux10.20

Here's a faulty snippit of code I got trying to compile make 3.80 with gcc 3.3.1
on an HPUX machine.  The problem seems to be that the "*" is not removed from
the function symbol name glob64:

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:

I've looked into this a bit, and it would seem that the .stabn line with the
problem is being created in .../gcc-3.3.1/gcc/config/pa/som.h, around line 39. 
I've looked at some corresponding code for other architectures and they all seem
to surround the XSTR with a call to assemble_name(FILE, XSTR ... ).  This line
is a bit curious because it ends with a "+ 1" to a string, which I assume is the
old way to get past the leading _ or other character on symbol names.

For now, I'm working around this by removing the -g from all compiles, but
that's not a great long-term solution...

I'm going to try a crack at fixing this code myself, and if I can solve the
problem, I'll add a diff or whatever to this bug report.

REPRODUCING

.../make-3.80/configure --prefix=$PWD/install --disable-nls
make

make exits with something like

Command: make
make  all-recursive
make[1]: Entering directory `/tmp/make.2a'
Making all in glob
make[2]: Entering directory `/tmp/make.2a/glob'
if gcc -DHAVE_CONFIG_H -I. -I/media/gnu/make-3.80/glob -I..     -g -O2 -MT
glob.o -MD -MP -MF ".deps/glob.Tpo" \
  -c -o glob.o `test -f '/media/gnu/make-3.80/glob/glob.c' || echo
'/media/gnu/make-3.80/glob/'`/media/gnu/make-3.80/glob/glob.c; \
then mv ".deps/glob.Tpo" ".deps/glob.Po"; \
else rm -f ".deps/glob.Tpo"; exit 1; \
fi
In file included from /media/gnu/make-3.80/glob/glob.c:203:
/media/gnu/make-3.80/glob/glob.c: In function `glob':
/media/gnu/make-3.80/glob/glob.c:197: warning: passing arg of `my_realloc' from
incompatible pointer type
In file included from /media/gnu/make-3.80/glob/glob.c:203:
/media/gnu/make-3.80/glob/glob.c:197: warning: passing arg of `my_realloc' from
incompatible pointer type
In file included from /media/gnu/make-3.80/glob/glob.c:203:
/media/gnu/make-3.80/glob/glob.c:197: warning: passing arg of `my_realloc' from
incompatible pointer type
In file included from /media/gnu/make-3.80/glob/glob.c:203:
/media/gnu/make-3.80/glob/glob.c: In function `glob_in_dir':
/media/gnu/make-3.80/glob/glob.c:197: warning: passing arg of `my_realloc' from
incompatible pointer type
/var/tmp//ccm47IgT.s: Assembler messages:
/var/tmp//ccm47IgT.s:641: Error: bad expression
/var/tmp//ccm47IgT.s:641: Warning: rest of line ignored; first ignored character
is `g'
/var/tmp//ccm47IgT.s:647: Error: bad expression
/var/tmp//ccm47IgT.s:647: Warning: rest of line ignored; first ignored character
is `g'
/var/tmp//ccm47IgT.s:670: Error: bad expression
/var/tmp//ccm47IgT.s:670: Warning: rest of line ignored; first ignored character
is `g'


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
@ 2003-10-24 17:01 ` pinskia at gcc dot gnu dot org
  2003-10-24 17:30 ` mario dot nigrovic at motorola dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-24 17:01 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-24 16:56 -------
Are you using GNU binutils or the native toolchain?
Also how did you configure gcc?
How did you build gcc?


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
  2003-10-24 17:01 ` [Bug target/12764] " pinskia at gcc dot gnu dot org
@ 2003-10-24 17:30 ` mario dot nigrovic at motorola dot com
  2003-10-24 19:11 ` mario dot nigrovic at motorola dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mario dot nigrovic at motorola dot com @ 2003-10-24 17:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764



------- Additional Comments From mario dot nigrovic at motorola dot com  2003-10-24 17:24 -------
Sorry I didn't include this before.  GNU binutils (as only, ld is not supported
for this platform).

++ as --version
GNU assembler 2.14 20030612
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 `hppa2.0-hp-hpux10.20'.

++ gcc -v
Reading specs from /tmp/GNU_temp/lib/gcc-lib/hppa2.0-hp-hpux10.20/3.3.1/specs
Configured with: /media/gnu/gcc-3.3.1/configure --prefix=/tmp/GNU_temp
--enable-languages=c,c++ --disable-nls --with-gnu-as
--with-as=/tmp/GNU_temp/bin/as --without-gnu-ld
Thread model: single
gcc version 3.3.1


I have the configure and make logs, if you're interested, but they're huge...

The compiler used to build the new binutils and gcc is

++ /tools/GNU/003/HP-UX_B.10.20/bin/gcc -v
Reading specs from
/tools/GNU/003/HP-UX_B.10.20/lib/gcc-lib/hppa2.0-hp-hpux10.20/3.0.4/specs
Configured with: /media/gnu/gcc-3.0.4/configure
--prefix=/tools/GNU/003/HP-UX_B.10.20 --with-gnu-as
--with-as=/tools/GNU/003/HP-UX_B.10.20/bin/as --with-gnu-ld
--with-ld=/tools/GNU/003/HP-UX_B.10.20/bin/ld
Thread model: single
gcc version 3.0.4


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
  2003-10-24 17:01 ` [Bug target/12764] " pinskia at gcc dot gnu dot org
  2003-10-24 17:30 ` mario dot nigrovic at motorola dot com
@ 2003-10-24 19:11 ` mario dot nigrovic at motorola dot com
  2003-10-25  2:41 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mario dot nigrovic at motorola dot com @ 2003-10-24 19:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764



------- Additional Comments From mario dot nigrovic at motorola dot com  2003-10-24 19:09 -------
Created an attachment (id=4989)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4989&action=view)
Call assemble_name on the function name.

Whether the local labels should also be subjected to assemble_name is
unresolved.  I think it's a completeness issue more than a current problem.


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
                   ` (2 preceding siblings ...)
  2003-10-24 19:11 ` mario dot nigrovic at motorola dot com
@ 2003-10-25  2:41 ` pinskia at gcc dot gnu dot org
  2003-10-26 20:19 ` mario dot nigrovic at motorola dot com
  2003-10-26 20:28 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-25  2:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Target Milestone|---                         |3.4


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-25 02:37 -------
Can you update your patch for the mainline and post it to gcc-patches@gcc.gnu.org with a 
changelog?


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
                   ` (3 preceding siblings ...)
  2003-10-25  2:41 ` pinskia at gcc dot gnu dot org
@ 2003-10-26 20:19 ` mario dot nigrovic at motorola dot com
  2003-10-26 20:28 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mario dot nigrovic at motorola dot com @ 2003-10-26 20:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764



------- Additional Comments From mario dot nigrovic at motorola dot com  2003-10-26 20:08 -------
I looked at the current cvs, and it seems to have already been addressed.  The
new syntax is

#define ASM_OUTPUT_SOURCE_LINE(file, line, counter)		\
  { static tree last_function_decl = NULL;			\
    if (current_function_decl == last_function_decl)		\
      {								\
	rtx func = DECL_RTL (current_function_decl);		\
	const char *name = XSTR (XEXP (func, 0), 0);		\
	fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n",	\
		 line, counter,					\
		 (* targetm.strip_name_encoding) (name),	\
		 counter);					\
      }								\
    else							\
      fprintf (file, "\t.stabn 68,0,%d,0\n", line);		\
    last_function_decl = current_function_decl;			\
  }


which is quite a bit different from my solution, but at least means this has
been looked at.  Looking at dbxelf.h, I do see that it's handled differently, there:

#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER)			\
do									\
  {									\
    char temp[256];							\
    ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER);			\
    fprintf (FILE, "\t.stabn 68,0,%d,", LINE);				\
    assemble_name (FILE, temp);						\
    putc ('-', FILE);							\
    assemble_name (FILE,						\
		   XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
    putc ('\n', FILE);							\
    (*targetm.asm_out.internal_label) (FILE, "LM", COUNTER);		\
  }									\
while (0)

(It's still using assemble_name for the function name.  I don't pretend to
understand the subtleties of this variation, but I guess it does seem suspicious
to me that the implementation is so different.)

-- Mario


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

* [Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20
  2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
                   ` (4 preceding siblings ...)
  2003-10-26 20:19 ` mario dot nigrovic at motorola dot com
@ 2003-10-26 20:28 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-26 20:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-26 20:24 -------
Fixed by a different patch so closing.


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

end of thread, other threads:[~2003-10-26 20:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24 16:56 [Bug c/12764] New: gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20 mario dot nigrovic at motorola dot com
2003-10-24 17:01 ` [Bug target/12764] " pinskia at gcc dot gnu dot org
2003-10-24 17:30 ` mario dot nigrovic at motorola dot com
2003-10-24 19:11 ` mario dot nigrovic at motorola dot com
2003-10-25  2:41 ` pinskia at gcc dot gnu dot org
2003-10-26 20:19 ` mario dot nigrovic at motorola dot com
2003-10-26 20:28 ` pinskia at gcc dot gnu dot org

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