------- Additional Comments From hjl at lucon dot org  2004-11-27 20:44 -------
DECL_ASSEMBLER_NAME_SET_P alone is not very reliable to check if a symbol
has been renamed or not. There are

/* The name of the object as the assembler will see it (but before any
   translations made by ASM_OUTPUT_LABELREF).  Often this is the same
   as DECL_NAME.  It is an IDENTIFIER_NODE.  */
#define DECL_ASSEMBLER_NAME(NODE) decl_assembler_name (NODE)

/* Returns nonzero if the DECL_ASSEMBLER_NAME for NODE has been set.  If zero, 
  the NODE might still have a DECL_ASSEMBLER_NAME -- it just hasn't been set
   yet.  */ #define DECL_ASSEMBLER_NAME_SET_P(NODE) \
  (DECL_CHECK (NODE)->decl.assembler_name != NULL_TREE)

and

/* The name of the object as the assembler will see it (but before any
   translations made by ASM_OUTPUT_LABELREF).  Often this is the same
   as DECL_NAME.  It is an IDENTIFIER_NODE.  */
tree
decl_assembler_name (tree decl)
{
  if (!DECL_ASSEMBLER_NAME_SET_P (decl))
    lang_hooks.set_decl_assembler_name (decl);
  return DECL_CHECK (decl)->decl.assembler_name;
}

Simply calling DECL_ASSEMBLER_NAME will make DECL_ASSEMBLER_NAME_SET_P to
return TRUE.

-- 


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

Reply via email to