OSDN Git Service

PR c++/58273
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Sep 2013 22:38:42 +0000 (22:38 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Sep 2013 22:38:42 +0000 (22:38 +0000)
* pt.c (any_type_dependent_elements_p): Actually check for
type-dependence, not value-dependence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@202583 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/inherit9.C [new file with mode: 0644]

index 2473442..35b41c0 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/58273
+       * pt.c (any_type_dependent_elements_p): Actually check for
+       type-dependence, not value-dependence.
+
 2013-08-20  Jason Merrill  <jason@redhat.com>
 
        PR c++/58119
index 4fbf9d5..1b9f314 100644 (file)
@@ -19552,7 +19552,7 @@ bool
 any_type_dependent_elements_p (const_tree list)
 {
   for (; list; list = TREE_CHAIN (list))
-    if (value_dependent_expression_p (TREE_VALUE (list)))
+    if (type_dependent_expression_p (TREE_VALUE (list)))
       return true;
 
   return false;
diff --git a/gcc/testsuite/g++.dg/template/inherit9.C b/gcc/testsuite/g++.dg/template/inherit9.C
new file mode 100644 (file)
index 0000000..926343b
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/58273
+
+class A {};
+class B
+{
+  int goo(A);
+};
+template<typename E>
+class D : public B
+{
+  void foo(A t)
+  {
+    int const i(B::goo(t));
+  }
+};