aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-02-04 17:50:22 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-02-04 17:50:22 +0100
commitee429f8459118f0286430a8f86884055ae954694 (patch)
tree9a4e4de9a60f6b8c400fb1e352863fd9b69294d5 /gcc/testsuite
parent5b43bf058b51b25a6e90692bc61b3efad883b7e7 (diff)
downloadgcc-ee429f8459118f0286430a8f86884055ae954694.zip
gcc-ee429f8459118f0286430a8f86884055ae954694.tar.gz
gcc-ee429f8459118f0286430a8f86884055ae954694.tar.bz2
re PR c++/39095 (Mangling changes break ABI)
PR c++/39095 * operators.def: Use COMPONENT_REF code for ->/pt operator again, remove ./dt operator. * mangle.c (write_expression): Handle COMPONENT_REF after handling ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it write_string ("dt") instead of using operators.def. * g++.dg/abi/mangle31.C: New test. From-SVN: r143933
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle31.C35
2 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 25dedae..37b5783 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39095
+ * g++.dg/abi/mangle31.C: New test.
+
2009-02-03 Joseph Myers <joseph@codesourcery.com>
PR c/29129
diff --git a/gcc/testsuite/g++.dg/abi/mangle31.C b/gcc/testsuite/g++.dg/abi/mangle31.C
new file mode 100644
index 0000000..4be2e0b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle31.C
@@ -0,0 +1,35 @@
+// PR c++/39095
+// { dg-do compile }
+
+struct B
+{
+ int b;
+};
+
+struct A
+{
+ B *operator->();
+ A ();
+ B b;
+};
+
+A::A ()
+{
+}
+
+B *
+A::operator->()
+{
+ return &b;
+}
+
+A a;
+
+int
+foo ()
+{
+ return a->b;
+}
+
+// { dg-final { scan-assembler "_ZN1AptEv" } }
+// { dg-final { scan-assembler-not "_ZN1AdtEv" } }