summaryrefslogtreecommitdiffstats
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index d8041ab53e4..495e0d4576a 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1444,7 +1444,9 @@ unemitted_tinfo_decl_p (t, data)
{
if (/* It's a var decl */
TREE_CODE (t) == VAR_DECL
- /* whos name points back to itself */
+ /* which has a name */
+ && DECL_NAME (t)
+ /* whose name points back to itself */
&& IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t
/* whose name's type is non-null */
&& TREE_TYPE (DECL_NAME (t))
OpenPOWER on IntegriCloud