summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/mangle2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/mangle2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/mangle2.C24
1 files changed, 24 insertions, 0 deletions
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 000000000..81cf2f3de
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/mangle2.C
@@ -0,0 +1,24 @@
+// { 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();
+}