[Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
adam.rak at streamnovation dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 27 17:16:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: adam.rak@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.
More information about the Gcc-bugs
mailing list