diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-10 16:32:13 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-10 16:32:13 +0000 |
commit | 8004fb1772962f510800e19c3c7cd7e01440dccb (patch) | |
tree | c50e58a67d0579f2af75b1c464d47303fee8fa4a | |
parent | f0ee28255394c95e57e760226f517822835d297d (diff) |
* pt.c (dependent_type_p): Make sure we aren't called with
global_type_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247843 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 45ef8d3904c..09caa02ba70 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 72256b3bd25..b9e7af7066b 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)) |