aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-05-10 12:32:13 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-05-10 12:32:13 -0400
commit415dcf965368a67599b93579848181ecec24f860 (patch)
treec50e58a67d0579f2af75b1c464d47303fee8fa4a /gcc
parent0ea37ae178ba156ec9f88134acc4bb13665c56ef (diff)
downloadgcc-415dcf965368a67599b93579848181ecec24f860.zip
gcc-415dcf965368a67599b93579848181ecec24f860.tar.gz
gcc-415dcf965368a67599b93579848181ecec24f860.tar.bz2
pt.c (dependent_type_p): Make sure we aren't called with global_type_node.
* pt.c (dependent_type_p): Make sure we aren't called with global_type_node. From-SVN: r247843
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 45ef8d3..09caa02 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2017-05-10 Jason Merrill <jason@redhat.com>
+ * pt.c (dependent_type_p): Make sure we aren't called with
+ global_type_node.
+
PR c++/79549 - C++17 ICE with non-type auto template parameter pack
* pt.c (convert_template_argument): Just return an argument pack.
(coerce_template_parameter_pack, template_parm_to_arg)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 72256b3..b9e7af7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -23436,6 +23436,10 @@ dependent_type_p (tree type)
if (type == error_mark_node)
return false;
+ /* Getting here with global_type_node means we improperly called this
+ function on the TREE_TYPE of an IDENTIFIER_NODE. */
+ gcc_checking_assert (type != global_type_node);
+
/* If we have not already computed the appropriate value for TYPE,
do so now. */
if (!TYPE_DEPENDENT_P_VALID (type))