@@ -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));
}
new file mode 100644
@@ -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 (); }
+};