public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
@ 2011-01-27 17:16 adam.rak at streamnovation dot com
2011-01-28 12:00 ` [Bug middle-end/47496] " rguenth at gcc dot gnu.org
2012-01-06 0:18 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: adam.rak at streamnovation dot com @ 2011-01-27 17:16 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/47496] HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
2011-01-27 17:16 [Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency adam.rak at streamnovation dot com
@ 2011-01-28 12:00 ` rguenth at gcc dot gnu.org
2012-01-06 0:18 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-28 12:00 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/47496] HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency
2011-01-27 17:16 [Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency adam.rak at streamnovation dot com
2011-01-28 12:00 ` [Bug middle-end/47496] " rguenth at gcc dot gnu.org
@ 2012-01-06 0:18 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-06 0:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47496
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-06 00:18:24 UTC ---
Invalid as mentioned by Richard, you need to check DECL_ASSEMBLER_NAME_SET_P
also.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-06 0:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 17:16 [Bug middle-end/47496] New: HAS_DECL_ASSEMBLER_NAME_P and DECL_ASSEMBLER_NAME has some incosistency adam.rak at streamnovation dot com
2011-01-28 12:00 ` [Bug middle-end/47496] " rguenth at gcc dot gnu.org
2012-01-06 0:18 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).