aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-05-24 19:44:59 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-05-24 19:44:59 -0400
commitf52f3c6dab8faaba5db2b7c1fb558134210d8b93 (patch)
tree4216f7f45aa36e01e847d24d3ffa5d1ce9dda49d /gcc/testsuite
parentb850be9d50210da752443e730723285bbd1b7c96 (diff)
downloadgcc-f52f3c6dab8faaba5db2b7c1fb558134210d8b93.zip
gcc-f52f3c6dab8faaba5db2b7c1fb558134210d8b93.tar.gz
gcc-f52f3c6dab8faaba5db2b7c1fb558134210d8b93.tar.bz2
re PR c++/49042 ([C++0x] wrong "protected" when using template and decltype)
PR c++/49042 * pt.c (get_mostly_instantiated_function_type): Use push_deferring_access_checks rather than set flag_access_control. From-SVN: r174151
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/access01.C15
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c1dcaed..14ef5be 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-24 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/access01.C: New.
+
2011-05-24 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/48177
diff --git a/gcc/testsuite/g++.dg/cpp0x/access01.C b/gcc/testsuite/g++.dg/cpp0x/access01.C
new file mode 100644
index 0000000..43e5e86
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/access01.C
@@ -0,0 +1,15 @@
+// PR c++/49042
+// { dg-options -std=c++0x }
+
+template <class T>
+class A
+{
+ T p;
+public:
+ template <class U> auto f() -> decltype(+p) { }
+};
+
+int main()
+{
+ A<int>().f<int>();
+}