This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
- From: "adam.rak at streamnovation dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 16:59:17 +0000
- Subject: [Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
- Auto-submitted: auto-generated
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.