diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-17 20:28:38 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-17 20:28:38 +0000 |
commit | b7204f706bcc422e4a18e2b6a9c8ca75979b716d (patch) | |
tree | 944e3f2408dbdc26f8b77dfd24a0e1f5230b31b5 /gcc/cp | |
parent | 2b6cba8a9eae01293e1439929357118ffb313aaa (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')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a660c434c79..2e2cd6c48c5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2017-02-17 Jason Merrill <jason@redhat.com> + PR c++/78690 - ICE with using and global type with same name + * pt.c (type_dependent_object_expression_p): True for + IDENTIFIER_NODE. + PR c++/79549 - C++17 ICE with non-type auto template parameter pack * pt.c (convert_template_argument): Just return an auto arg pack. (tsubst_template_args): Don't tsubst an auto pack type. 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)); } |