aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-03-23 21:36:44 -0500
committerJason Merrill <jason@gcc.gnu.org>1999-03-23 21:36:44 -0500
commit2ced0b14a9235e886f415fd3f2cf312ec3734ab0 (patch)
tree9731dfd509f22755ee53ef76f55f62ea7ceffd4b /gcc
parentd986e15aa30fef00bef75e7b60a6510ff0c68454 (diff)
downloadgcc-2ced0b14a9235e886f415fd3f2cf312ec3734ab0.zip
gcc-2ced0b14a9235e886f415fd3f2cf312ec3734ab0.tar.gz
gcc-2ced0b14a9235e886f415fd3f2cf312ec3734ab0.tar.bz2
new
From-SVN: r25942
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/lookup10.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/mangle1.C42
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/mangle2.C42
3 files changed, 94 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup10.C b/gcc/testsuite/g++.old-deja/g++.other/lookup10.C
new file mode 100644
index 0000000..da2b485
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/lookup10.C
@@ -0,0 +1,10 @@
+// Build don't link:
+
+struct A {
+ struct B {
+ static int i;
+ };
+ enum { a };
+};
+
+int A::B::i = a;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/mangle1.C b/gcc/testsuite/g++.old-deja/g++.other/mangle1.C
new file mode 100644
index 0000000..0ffc5d1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/mangle1.C
@@ -0,0 +1,42 @@
+// Test for proper mangling by setting up name clashes.
+// Special g++ Options: -fno-squangle
+
+class A { };
+typedef A A2;
+typedef int I;
+typedef void V;
+typedef I I2;
+
+void f (const A2&, int, const A2&, const A&) { } // ERROR - name clash
+int f__FRC1AiT0T0 = 0; // ERROR - name clash
+
+void f (int, long, int, I) { } // ERROR - name clash
+int f__Filii = 0; // ERROR - name clash
+
+void f (I, float, I, I2) { } // ERROR - name clash
+int f__Fifii = 0; // ERROR - name clash
+
+void f (void*, float, void*, V*) { } // ERROR - name clash
+int f__FPvfT0T0 = 0; // ERROR - name clash
+
+void f (wchar_t) { } // ERROR - name clash
+int f__Fw = 0; // ERROR - name clash
+
+void f(int, A, A2, A) { } // ERROR - name clash
+int f__FiG1AN21 = 0; // ERROR - name clash
+
+void f(const A2&, const A2&, const A2&, const A2&,
+ int&) { } // ERROR - name clash
+int f__FRC1AN30Ri = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&,
+ int&) { } // ERROR - name clash
+int f__FRC1AiT0N20Ri = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&, int&, int&,
+ int&) { } // ERROR - name clash
+int f__FRC1AiT0N20RiN25 = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&, int, int,
+ int) { } // ERROR - name clash
+int f__FRC1AiT0N20iii = 0; // ERROR - name clash
diff --git a/gcc/testsuite/g++.old-deja/g++.other/mangle2.C b/gcc/testsuite/g++.old-deja/g++.other/mangle2.C
new file mode 100644
index 0000000..873cb36
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/mangle2.C
@@ -0,0 +1,42 @@
+// Test for proper mangling by setting up name clashes.
+// Special g++ Options: -fsquangle
+
+class A;
+typedef A A2;
+typedef int I;
+typedef void V;
+typedef I I2;
+
+void f (const A2&, int, const A2&, const A&) { } // ERROR - name clash
+int f__FRC1AiRCB0n1 = 0; // ERROR - name clash
+
+void f (int, long, int, I) { } // ERROR - name clash
+int f__Filii = 0; // ERROR - name clash
+
+void f (I, float, I, I2) { } // ERROR - name clash
+int f__Fifii = 0; // ERROR - name clash
+
+void f (void*, float, void*, V*) { } // ERROR - name clash
+int f__FPvfPvn1 = 0; // ERROR - name clash
+
+void f (wchar_t) { } // ERROR - name clash
+int f__Fw = 0; // ERROR - name clash
+
+void f(int, A, A2, A) { } // ERROR - name clash
+int f__FiG1An2 = 0; // ERROR - name clash
+
+void f(const A2&, const A2&, const A2&, const A2&,
+ int&) { } // ERROR - name clash
+int f__FRC1An3Ri = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&,
+ int&) { } // ERROR - name clash
+int f__FRC1AiRCB0n2Ri = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&, int&, int&,
+ int&) { } // ERROR - name clash
+int f__FRC1AiRCB0n2Rin2 = 0; // ERROR - name clash
+
+void f(const A2&, int, const A2&, const A2&, const A2&, int, int,
+ int) { } // ERROR - name clash
+int f__FRC1AiRCB0n2in2 = 0; // ERROR - name clash