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

Reply via email to