2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Oct 2013 10:54:56 +0000 (10:54 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Oct 2013 10:54:56 +0000 (10:54 +0000)
PR c++/54812
* g++.dg/cpp0x/defaulted47.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204057 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/defaulted47.C [new file with mode: 0644]

index 5ba87b5..f6b958d 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-25  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/54812
+       * g++.dg/cpp0x/defaulted47.C: New.
+
 2013-10-25  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.c-torture/execute/pr58831.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted47.C b/gcc/testsuite/g++.dg/cpp0x/defaulted47.C
new file mode 100644 (file)
index 0000000..f4b62a3
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/54812
+// { dg-do compile { target c++11 } }
+
+class A
+{
+  A() = default;   // { dg-error "private" }
+};
+
+A a;               // { dg-error "context" }
+
+class B
+{
+  ~B() = default;  // { dg-error "private" }
+};
+
+B b;               // { dg-error "context" }