aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 3aa9b59..a2db157 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1044,11 +1044,13 @@ dump_template_decl (tree t, int flags)
}
}
- if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == TYPE_DECL)
+ if (DECL_TEMPLATE_RESULT (t)
+ && TREE_CODE (DECL_TEMPLATE_RESULT (t)) == TYPE_DECL)
dump_type (TREE_TYPE (t),
((flags & ~TFF_CLASS_KEY_OR_ENUM) | TFF_TEMPLATE_NAME
| (flags & TFF_DECL_SPECIFIERS ? TFF_CLASS_KEY_OR_ENUM : 0)));
- else if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == VAR_DECL)
+ else if (DECL_TEMPLATE_RESULT (t)
+ && TREE_CODE (DECL_TEMPLATE_RESULT (t)) == VAR_DECL)
dump_decl (DECL_TEMPLATE_RESULT (t), flags | TFF_TEMPLATE_NAME);
else
{