* pt.c (type_dependent_object_expression_p): True for
IDENTIFIER_NODE.
From-SVN: r245549
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.
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));
}
--- /dev/null
+// 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 (); }
+};