+2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/11704
+ * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
+ unknown type.
+
+ PR c++/11766
+ * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
+ member functions.
+
2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9447
{
if (TREE_CODE (expression) == ADDR_EXPR)
return type_dependent_expression_p (TREE_OPERAND (expression, 0));
+ if (TREE_CODE (expression) == COMPONENT_REF)
+ {
+ if (type_dependent_expression_p (TREE_OPERAND (expression, 0)))
+ return true;
+ expression = TREE_OPERAND (expression, 1);
+ if (TREE_CODE (expression) == IDENTIFIER_NODE)
+ return false;
+ }
+
if (TREE_CODE (expression) == BASELINK)
expression = BASELINK_FUNCTIONS (expression);
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
+ PR c++/11704
+ * g++.dg/template/dependent-expr2.C: New test.
+
PR c++/11766
* g++.dg/expr/ptrmem1.C: New test.
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 2 Aug 2003 <nathan@codesourcery.com>
+
+// PR 11704. ICE
+
+struct A
+{
+ int foo()
+ {
+ return 5;
+ }
+};
+
+template <class T> // If B is not template it works
+struct B
+{
+ bool bar(A& a)
+ {
+ return a.foo == 0; // { dg-error "insufficient context" "" }
+ }
+};