OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / mangle2.C
index 873cb36..81cf2f3 100644 (file)
@@ -1,42 +1,24 @@
-// 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
+// { dg-do assemble  }
+// Test for overloaded operators in "C" linkage
+
+extern "C" {
+typedef struct b
+{
+  int a;
+} c;
+
+extern const c z;
+
+inline bool operator!=(const c& x, const c& y)
+{
+  return x.a != y.a;
+}
+}
+
+void foo();
+
+void bar(c x)
+{
+  if (x != z)
+    foo();
+}