aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-17 20:28:38 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-17 20:28:38 +0000
commitb7204f706bcc422e4a18e2b6a9c8ca75979b716d (patch)
tree944e3f2408dbdc26f8b77dfd24a0e1f5230b31b5 /gcc/cp/pt.c
parent2b6cba8a9eae01293e1439929357118ffb313aaa (diff)
PR c++/78690 - ICE with using and global type with same name
* pt.c (type_dependent_object_expression_p): True for IDENTIFIER_NODE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 04479d4d486..9e6ce8d51de 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -23932,6 +23932,10 @@ type_dependent_expression_p (tree expression)
bool
type_dependent_object_expression_p (tree object)
{
+ /* An IDENTIFIER_NODE can sometimes have a TREE_TYPE, but it's still
+ dependent. */
+ if (TREE_CODE (object) == IDENTIFIER_NODE)
+ return true;
tree scope = TREE_TYPE (object);
return (!scope || dependent_scope_p (scope));
}