This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47496] HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Jan 2011 11:13:00 +0000
- Subject: [Bug middle-end/47496] HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
- Auto-submitted: auto-generated
- References: <bug-47496-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47496
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-28 11:12:52 UTC ---
You should use
if (HAS_DECL_ASSEMBLER_NAME_P (expr)
&& DECL_ASSEMBLER_NAME_SET_P (expr))
DECL_ASSEMBLER_NAME (expr);
calling decl_assembler_name on random things is not what you should do.