PR c++/12397
* typeck.c (finish_class_member_access_expr): Don't tree
IDENTIFIER_NODEs as non-dependent expressions.
PR c++/12397
* g++.dg/template/lookup3.C: New test.
From-SVN: r74949
+2003-12-22 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12397
+ * typeck.c (finish_class_member_access_expr): Don't tree
+ IDENTIFIER_NODEs as non-dependent expressions.
+
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050
{
if (/* If OBJECT_TYPE is dependent, so is OBJECT.NAME. */
dependent_type_p (object_type)
+ /* If NAME is just an IDENTIFIER_NODE, then the expression
+ is dependent. */
+ || TREE_CODE (object) == IDENTIFIER_NODE
/* If NAME is "f<args>", where either 'f' or 'args' is
dependent, then the expression is dependent. */
|| (TREE_CODE (name) == TEMPLATE_ID_EXPR
+2003-12-22 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12397
+ * g++.dg/template/lookup3.C: New test.
+
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
* g++.dg/template/recurse1.C: New test
--- /dev/null
+// PR c++/12397
+
+struct foo { };
+
+template <typename T> struct bar
+{
+ bar(){}
+ int i;
+ bar (const bar<T>& foo) : i (foo.i) {}
+};
+
+int main()
+{
+ bar<int> b1;
+ bar<int> b2(b1);
+}