public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gcov weirdness: local lable being declared
@ 2005-07-30 17:15 Kean Johnston
  2005-07-30 20:21 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Kean Johnston @ 2005-07-30 17:15 UTC (permalink / raw)
  To: gcc

Hi everyone,

I am getting weird warning messages from my assembler when
gcov is being used. I have tracked what I think is the
problem down but I don't really know how to fix it. The
bit of assembler that causes the warning is:

     .type .LPBX0, @object
     .size .LPBX0, 52
.LPBX0:
     ... whole bunch of initialization stuff

The assembler warns that the .type/.size directive is useless.
This is causing many testsuite failures. The assembler is
right. Why is a local lable being declared as if it was a
global symbol? .LPBX0 comes from ASM_GENERATE_INTERNAL_LABEL.

The problem seems to start in coverage.c:create_coverage().
Fairly close to the top of that is a call to assemble_variable().
assemble_variable(), ends up calling ASM_DECLARE_OBJECT_NAME.
This is what is emitting the .type and .size directives.

Is there some way that the tree can be marked as an internal
construct, and if that is set, not have the bit of code in
assemble_variable() call ASM_DECLARE_OBJECT_NAME? Or perhaps
I can train A_D_O_N to not emit anything if its a local?

I see that the tree in question is declared static. Would it
be the right thing to have something like this at the end of
assemble_variable:

    if (!TREE_STATIC (decl)) {
#ifdef ASM_DECLARE_OBJECT_NAME
      last_assemble_variable_decl = decl;
      ASM_DECLARE_OBJECT_NAME (asm_out_file, name, decl);
#else
      /* Standard thing is just output label for the object.  */
      ASM_OUTPUT_LABEL (asm_out_file, name);
#endif
    }

I am not sure if "if (TREE_STATIC (decl))" is the correct test.
Is there a better test that I can check for an internal lable?

Thanks in advance for any insight.

Kean

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

end of thread, other threads:[~2005-07-31  0:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-30 17:15 gcov weirdness: local lable being declared Kean Johnston
2005-07-30 20:21 ` Ian Lance Taylor
2005-07-30 20:32   ` Kean Johnston
2005-07-31  0:31     ` Ian Lance Taylor
2005-07-30 21:07   ` Kean Johnston

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