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

           Summary: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has
                    some incosistency
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: middle-end
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: adam....@streamnovation.com


The following code would hit gcc_unreachable if DECL_ASSEMBLER_NAME_SET_P(expr)
is NULL, which seems valid if DECL_IGNORED_P is true.

if (HAS_DECL_ASSEMBLER_NAME_P(expr))
    return DECL_ASSEMBLER_NAME(expr);

It would be more consistent if DECL_ASSEMBLER_NAME returns NULL in this special
case. So DECL_ASSEMBLER_NAME should check DECL_IGNORED_P too.

The other case is when the assembler name hasn't been set yet and DECL_IGNORE_P
is false. It is unclear which counts as a bogus call to DECL_ASSEMBLER_NAME and
which is not.

Reply via email to