summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-04-04 11:25:21 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-04-04 11:25:21 -0400
commite43073896c5c778e1c509de365d63801909c2076 (patch)
treef874399fb49c2311cecbec842532e4d9dabb15da /gcc/cp
parent15f12d9677a4f8284578d03003fca4a6b78cc6d4 (diff)
downloadgcc-e43073896c5c778e1c509de365d63801909c2076.tar.gz
* semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
From-SVN: r246680
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 01baeb810ab..a28dcb5c638 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-03 Jason Merrill <jason@redhat.com>
+
+ * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
+
2017-04-03 Jonathan Wakely <jwakely@redhat.com>
* class.c (update_vtable_entry_for_fn): Fix typo in comment.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c57264623d1..0a695008ada 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3157,6 +3157,7 @@ finish_template_type (tree name, tree args, int entering_scope)
if (flag_concepts
&& entering_scope
&& CLASS_TYPE_P (type)
+ && CLASSTYPE_TEMPLATE_INFO (type)
&& dependent_type_p (type)
&& PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type)))
type = fixup_template_type (type);