OSDN Git Service

new
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Nov 1998 04:11:47 +0000 (04:11 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Nov 1998 04:11:47 +0000 (04:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23849 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.eh/ctor1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/spec26.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C
new file mode 100644 (file)
index 0000000..9874131
--- /dev/null
@@ -0,0 +1,15 @@
+struct A
+{
+  A();
+  A(A&);                       // ERROR - referenced below
+};
+
+int
+main ()
+{
+  try
+    {
+      throw A();               // ERROR - can't copy
+    }
+  catch (...) { }
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec26.C b/gcc/testsuite/g++.old-deja/g++.pt/spec26.C
new file mode 100644 (file)
index 0000000..1bd40b6
--- /dev/null
@@ -0,0 +1,11 @@
+// From: lat@iki.fi (Lassi A. Tuura)
+// Test that a specialization without an initializer is not a definition,
+// as specified in [temp.expl.spec].
+
+// Build don't link:
+
+struct X;
+template <class T> struct Y { static const X array[]; };
+template <> const X Y<int>::array [];
+struct X { int i; };
+template <> const X Y<int>::array [] = { 0, 1, 2, 3 };