aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2011-02-17 06:50:35 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2011-02-17 07:50:35 +0100
commit1770aeed11c064c75507eaca52a9e49234f9eff6 (patch)
treefc23bb02fc0bc9f23fa148ef548c987aee55d496 /gcc/testsuite
parentfc2c5998f7027c07717c7237ff3d68e97bd7d067 (diff)
downloadgcc-1770aeed11c064c75507eaca52a9e49234f9eff6.zip
gcc-1770aeed11c064c75507eaca52a9e49234f9eff6.tar.gz
gcc-1770aeed11c064c75507eaca52a9e49234f9eff6.tar.bz2
re PR c++/47172 ([C++0x] cannot call member function without object)
Fix PR c++/47172 gcc/cp/ PR c++/47172 * pt.c (finish_call_expr): Consider a call expression that has a dependent "this" pointer as being dependent. Add comments. (dependent_type_p, type_dependent_expression_p): Update comments. gcc/testsuite/ * g++.dg/template/inherit6.C: New test. From-SVN: r170240
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/inherit6.C23
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 19488e8..5275e99 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-11 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/47172
+ * g++.dg/template/inherit6.C: New test.
+
2011-02-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/47745
diff --git a/gcc/testsuite/g++.dg/template/inherit6.C b/gcc/testsuite/g++.dg/template/inherit6.C
new file mode 100644
index 0000000..241a68e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/inherit6.C
@@ -0,0 +1,23 @@
+// Origin PR c++/47172
+// { dg-options "-std=c++0x" }
+// { dg-do compile }
+
+struct A
+{
+ int f() const;
+};
+
+template <class T>
+struct B : A { };
+
+template <class T>
+struct C : B<T>
+{
+ void g();
+};
+
+template <class T>
+void C<T>::g()
+{
+ A::f();
+}