summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/abi/demangle/abi_text
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/abi/demangle/abi_text')
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/01.cc41
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/02.cc41
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/03.cc38
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/04.cc34
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/05.cc38
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/06.cc37
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/07.cc52
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/08.cc34
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/09.cc36
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/10.cc34
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/11.cc41
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/12.cc35
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/13.cc34
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/abi_text/14.cc34
14 files changed, 529 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/01.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/01.cc
new file mode 100644
index 000000000..1cfde0f73
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/01.cc
@@ -0,0 +1,41 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Examples given in the IA64 C++ ABI
+// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // 5.1.5 Type encodings.
+ // int* volatile const restrict _far p;
+ // cplus-dem FAIL
+ // icc CORE
+ // Equivalent as considered order-insensitive.
+ // standard text
+ // verify_demangle("U4_farrVKPi", "int* volatile const restrict _far");
+ // new __cxa_demangle
+ verify_demangle("U4_farrVKPi", "int* const volatile restrict _far");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/02.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/02.cc
new file mode 100644
index 000000000..e59bd1418
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/02.cc
@@ -0,0 +1,41 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // template<int I> void foo (int (&)[I + 1]) { };
+ // template void foo<2> (int (&)[3]);
+ // Equivalent, but formatting difference in void argument and parentheses.
+ // icc, __cxa_demangle
+ verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i",
+ "void foo<2>(int (&) [(2)+(1)])");
+ // cplus-dem
+ // verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i",
+ // "void foo<(int)2>(int (&) [((int)2)+((int)1)])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/03.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/03.cc
new file mode 100644
index 000000000..50318d1ec
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/03.cc
@@ -0,0 +1,38 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // struct A;
+ // void f (void (A::*)() const) {}
+ // cplus-dem FAIL
+ // Equivalent, but formatting difference in void argument.
+ verify_demangle("_Z1fM1AKFvvE", "f(void (A::*)() const)");
+ // verify_demangle("_Z1fM1AKFvvE", "f(void (A::*)(void) const)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/04.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/04.cc
new file mode 100644
index 000000000..d153bf058
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/04.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // void foo(char);
+ verify_demangle("_Z3fooc", "foo(char)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/05.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/05.cc
new file mode 100644
index 000000000..e420e501c
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/05.cc
@@ -0,0 +1,38 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // void foo(char);
+ // template<void (&)(char)> struct CB { };
+ // CB<foo> obj;
+ // cplus-dem FAIL
+ // standard text FAIL "CB<foo>"
+ verify_demangle("2CBIL_Z3foocEE", "CB<foo(char)>");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/06.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/06.cc
new file mode 100644
index 000000000..3391e2850
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/06.cc
@@ -0,0 +1,37 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // extern "C" bool IsEmpty(char *);
+ // template<void (&)(char *)> struct CB;
+ // CB<IsEmpty> is mangled as
+ // cplus-dem FAIL
+ verify_demangle("2CBIL_Z7IsEmptyEE", "CB<IsEmpty>");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/07.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/07.cc
new file mode 100644
index 000000000..9759a198b
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/07.cc
@@ -0,0 +1,52 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // 5.1.6 Scope Encoding
+ /*
+ namespace N
+ {
+ inline char*
+ f(int i)
+ {
+ static char *p = "Itanium C++ ABI"; // p = 1, "..." = 2
+ {
+ struct X
+ { // X = 3
+ void g() {}
+ };
+ }
+ return p[i];
+ }
+ }
+ */
+ // encoding of N::f::p (first local mangled entity)
+ verify_demangle("_ZZN1N1fEiE1p", "N::f(int)::p");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/08.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/08.cc
new file mode 100644
index 000000000..67bf817b9
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/08.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // encoding of N::f::"Itanium C++ ABI" (no discriminator)
+ verify_demangle("_ZZN1N1fEiEs", "N::f(int)::string literal");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/09.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/09.cc
new file mode 100644
index 000000000..714a76d63
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/09.cc
@@ -0,0 +1,36 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // encoding of N::f::X::g()
+ // (third local mangled entity used as a class-qualifier)
+ // cplus-dem FAIL
+ // icc CORE
+ verify_demangle("_ZNZN1N1fEiE1X1gE", "error code = -2: invalid mangled name");
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/10.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/10.cc
new file mode 100644
index 000000000..6207b815e
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/10.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ verify_demangle("_ZNZN1N1fEiE1X1gEv",
+ "error code = -2: invalid mangled name");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/11.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/11.cc
new file mode 100644
index 000000000..e36ee88a3
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/11.cc
@@ -0,0 +1,41 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // 5.1.7 Compression.
+ // typedef void T();
+ // struct S {};
+ // void f(T*, T (S::*)) { }
+ // Equivalent, void variance.
+ // standard text, not possible
+ // verify_demangle("_Z1fPFvvEM1SFvvE", "void f(T*, T (S::*))");
+ verify_demangle("_Z1fPFvvEM1SFvvE", "f(void (*)(), void (S::*)())");
+ // demangle("_Z1fPFvvEM1SFvvE", "f(void (*)(void), void (S::*)(void))");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/12.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/12.cc
new file mode 100644
index 000000000..bc1746b12
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/12.cc
@@ -0,0 +1,35 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // N::T<int, int>::mf(N::T<double, double>)
+ verify_demangle("_ZN1N1TIiiE2mfES0_IddE",
+ "N::T<int, int>::mf(N::T<double, double>)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/13.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/13.cc
new file mode 100644
index 000000000..08b802ed9
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/13.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // std::state
+ verify_demangle("_ZSt5state", "std::state");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_text/14.cc b/libstdc++-v3/testsuite/abi/demangle/abi_text/14.cc
new file mode 100644
index 000000000..fde74b98c
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/abi_text/14.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// Specific examples mentioned in the IA64 C++ ABI text
+// http://www.codesourcery.com/cxx-abi/abi.html#mangling
+int main()
+{
+ using namespace __gnu_test;
+
+ // std::_In::ward
+ verify_demangle("_ZNSt3_In4wardE", "std::_In::ward");
+
+ return 0;
+}