aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-11-24 23:11:47 -0500
committerJason Merrill <jason@gcc.gnu.org>1998-11-24 23:11:47 -0500
commita64f294eeae361dd1be45d145b30f0904ec557e5 (patch)
tree6d7a75294b480f01e8a6c83abefb2c79105102f9 /gcc
parent32201ce4ea04e55691947bac2a4e9247a6a9e71e (diff)
downloadgcc-a64f294eeae361dd1be45d145b30f0904ec557e5.zip
gcc-a64f294eeae361dd1be45d145b30f0904ec557e5.tar.gz
gcc-a64f294eeae361dd1be45d145b30f0904ec557e5.tar.bz2
new
From-SVN: r23849
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/ctor1.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec26.C11
2 files changed, 26 insertions, 0 deletions
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
index 0000000..9874131
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C
@@ -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
index 0000000..1bd40b6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec26.C
@@ -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 };