PR c++/78690 - ICE with using and global type with same name

* pt.c (type_dependent_object_expression_p): True for
	IDENTIFIER_NODE.

From-SVN: r245549
This commit is contained in:
Jason Merrill 2017-02-17 15:28:38 -05:00 committed by Jason Merrill
parent a530e18167
commit 7c5867495b
3 changed files with 25 additions and 0 deletions

View File

@ -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.

View File

@ -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));
}

View File

@ -0,0 +1,17 @@
// PR c++/78690
struct C;
template <typename T>
struct A
{
struct C { static void bar (); };
};
template <typename T>
struct B
{
using A<T>::C;
void
foo () { C.bar (); }
};