summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/demangle/regression
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/demangle/regression')
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/3111-1.cc33
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/3111-2.cc38
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-01.cc33
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-02.cc35
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-03.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-04.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-05.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-06.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-07.cc35
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-08.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-09.cc40
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-10.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-11.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986-12.cc47
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/7986.cc32
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/8897.cc61
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-01.cc54
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-02.cc59
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-03.cc54
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-04.cc45
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-05.cc51
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-06.cc51
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-07.cc62
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-08.cc54
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-09.cc62
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-10.cc52
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-11.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-12.cc88
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-13.cc34
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/cw-14.cc72
-rw-r--r--libstdc++-v3/testsuite/demangle/regression/old.cc31
31 files changed, 1395 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/demangle/regression/3111-1.cc b/libstdc++-v3/testsuite/demangle/regression/3111-1.cc
new file mode 100644
index 00000000000..6e7d702c289
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/3111-1.cc
@@ -0,0 +1,33 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// c++/3111
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ verify_demangle("_Z1fKPFiiE", "f(int (* const)(int))");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/3111-2.cc b/libstdc++-v3/testsuite/demangle/regression/3111-2.cc
new file mode 100644
index 00000000000..fe6ceb3abed
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/3111-2.cc
@@ -0,0 +1,38 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// c++/3111
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ // icc FAIL
+ // verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
+ // "f(int[sizeof(N::A::f() const::foo())])");
+ verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
+ "f(int[sizeof(N::A::f() const::foo)])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-01.cc b/libstdc++-v3/testsuite/demangle/regression/7986-01.cc
new file mode 100644
index 00000000000..f05f097fe2f
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-01.cc
@@ -0,0 +1,33 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+ // cplus-dem FAIL
+ verify_demangle("_Z1fA37_iPS_", "f(int[37], int (*) [37])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-02.cc b/libstdc++-v3/testsuite/demangle/regression/7986-02.cc
new file mode 100644
index 00000000000..ae9d945cb01
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-02.cc
@@ -0,0 +1,35 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // Equivalent, but formatting difference in void argument.
+ // verify_demangle("_Z1fM1AFivEPS0_", "f(int (A::*)(void), int (*)(void))");
+ verify_demangle("_Z1fM1AFivEPS0_", "f(int (A::*)(), int (*)())");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-03.cc b/libstdc++-v3/testsuite/demangle/regression/7986-03.cc
new file mode 100644
index 00000000000..2596f9aa161
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-03.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z1fPFPA1_ivE", "f(int (*(*)()) [1])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-04.cc b/libstdc++-v3/testsuite/demangle/regression/7986-04.cc
new file mode 100644
index 00000000000..23d1f1f9cd6
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-04.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z1fPKM1AFivE", "f(int (A::* const*)())");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-05.cc b/libstdc++-v3/testsuite/demangle/regression/7986-05.cc
new file mode 100644
index 00000000000..b3393c903ff
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-05.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z1jM1AFivEPS1_", "j(int (A::*)(), int (A::**)())");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-06.cc b/libstdc++-v3/testsuite/demangle/regression/7986-06.cc
new file mode 100644
index 00000000000..360c70c1cfe
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-06.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z1sPA37_iPS0_", "s(int (*) [37], int (**) [37])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-07.cc b/libstdc++-v3/testsuite/demangle/regression/7986-07.cc
new file mode 100644
index 00000000000..933c4c61e42
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-07.cc
@@ -0,0 +1,35 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z3fooA30_A_i", "foo(int[30][])");
+
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-08.cc b/libstdc++-v3/testsuite/demangle/regression/7986-08.cc
new file mode 100644
index 00000000000..20800856518
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-08.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z3kooPA28_A30_i", "koo(int (*) [28][30])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-09.cc b/libstdc++-v3/testsuite/demangle/regression/7986-09.cc
new file mode 100644
index 00000000000..18a18b35c54
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-09.cc
@@ -0,0 +1,40 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ // Equivalent as considered order-insensitive?
+ // standard text, icc FAIL
+ // verify_demangle("_ZlsRKU3fooU4bart1XS0_",
+ // "operator<<(X const foo bart&, X const foo bart)");
+ // new __cxa_demangle
+ verify_demangle("_ZlsRKU3fooU4bart1XS0_",
+ "operator<<(X bart foo const&, X bart)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-10.cc b/libstdc++-v3/testsuite/demangle/regression/7986-10.cc
new file mode 100644
index 00000000000..ff7fa4c3a6c
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-10.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ verify_demangle("_ZlsRKU3fooU4bart1XS2_",
+ "operator<<(X bart foo const&, X bart foo const)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-11.cc b/libstdc++-v3/testsuite/demangle/regression/7986-11.cc
new file mode 100644
index 00000000000..49114d2c8ac
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-11.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem FAIL
+ verify_demangle("_Z1fM1AKFivE", "f(int (A::*)() const)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986-12.cc b/libstdc++-v3/testsuite/demangle/regression/7986-12.cc
new file mode 100644
index 00000000000..64a400f781f
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986-12.cc
@@ -0,0 +1,47 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libstdc++/7986
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // ICE on figmative float template parameters?
+ /*
+ demangle("_Z3absILd1c1f1496f8a44219EEvv", "void abs<3.14159e-173>()");
+ demangle("_Z3absILd40092acd9e83e426EEvv", "void abs<3.1459>()");
+ demangl("_Z3absILe08042191a6cc56a2fe117becEEvv", "void abs<1.234e-2345l>()");
+ demangle("_Z3absILf4016147bEEvv", "void abs<2.345f>()");
+ demangle("_Z3absILfc1800000EEvv", " void abs<-16f>()");
+ demangle("_Z3absILe804bfff8000000000000000EEvv", "void abs<-1l>()");
+ */
+
+ // template<int D> void abs(void) { };
+ // template void abs<11>(void);
+ // Equivalent, but formatting difference in void argument.
+ // verify_demangle("_Z3absILi11EEvv", "void abs<(int)11>()");
+ verify_demangle("_Z3absILi11EEvv", "void abs<11>()");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/7986.cc b/libstdc++-v3/testsuite/demangle/regression/7986.cc
new file mode 100644
index 00000000000..05fa6a71c29
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/7986.cc
@@ -0,0 +1,32 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/8897.cc b/libstdc++-v3/testsuite/demangle/regression/8897.cc
new file mode 100644
index 00000000000..f40b90f30f6
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/8897.cc
@@ -0,0 +1,61 @@
+// 2003-02-26 Martin v. Loewis <martin@v.loewis.de>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// c++/8897
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ /*
+ template<typename T1>
+ struct A
+ {
+ template<typename T2>
+ operator T2();
+ };
+
+ A<float> a;
+ (int)a; <-- that function.
+ */
+ /*
+ Using "operator int()" is ambigious because that
+ could be either:
+
+ operator int();
+
+ or
+
+ template<typename T>
+ operator T();
+ with T = int.
+
+ - Carlo Wood
+ */
+ // cplus-dem FAIL
+ // icc FAIL
+ // new __cxa_demangle FAIL
+ verify_demangle("_ZN1AIfEcvT_IiEEv", "A<float>::operator int<int>()");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-01.cc b/libstdc++-v3/testsuite/demangle/regression/cw-01.cc
new file mode 100644
index 00000000000..cda35f6a808
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-01.cc
@@ -0,0 +1,54 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ /*
+class libcw_app_ct {
+public:
+ void dummy(char const*) { }
+ template<typename T>
+ static void add_option(void (T::*)(char const*), char const*, char,
+ char const*, char const*);
+};
+
+template<typename T>
+ void libcw_app_ct::add_option(void (T::*)(char const*), char const*, char,
+ char const*, char const*)
+{ }
+
+void fn(void)
+{
+ // Instantiation.
+ libcw_app_ct::add_option(&libcw_app_ct::dummy, "", '\0', "", "");
+}
+*/
+verify_demangle("_ZN12libcw_app_ct10add_optionIS_EEvMT_FvPKcES3_cS3_S3_",
+ "void libcw_app_ct::add_option<libcw_app_ct>(void (libcw_app_ct::*)(char const*), char const*, char, char const*, char const*)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-02.cc b/libstdc++-v3/testsuite/demangle/regression/cw-02.cc
new file mode 100644
index 00000000000..7c0d613bee3
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-02.cc
@@ -0,0 +1,59 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+namespace libcw {
+ namespace debug {
+ class memblk_types_manipulator_data_ct { };
+ }
+ template<typename T>
+ class omanip_id_tct { };
+ namespace {
+ template<typename T>
+ class compiler_bug_workaround {
+ public:
+ static std::vector<int> ids;
+ };
+ template<typename T>
+ std::vector<int> compiler_bug_workaround<T>::ids;
+ typedef std::vector<libcw::omanip_id_tct<libcw::debug::memblk_types_manipulator_data_ct> > vector_t;
+ compiler_bug_workaround<vector_t> dummy;
+ }
+}
+
+void g(void)
+{
+ // Instantiation.
+ libcw::dummy.ids.size();
+}
+*/
+ verify_demangle("_ZGVN5libcw24_GLOBAL__N_cbll.cc0ZhUKa23compiler_bug_workaroundISt6vectorINS_13omanip_id_tctINS_5debug32memblk_types_manipulator_data_ctEEESaIS6_EEE3idsE", "guard variable for libcw::(anonymous namespace)::compiler_bug_workaround<std::vector<libcw::omanip_id_tct<libcw::debug::memblk_types_manipulator_data_ct>, std::allocator<libcw::omanip_id_tct<libcw::debug::memblk_types_manipulator_data_ct> > > >::ids");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-03.cc b/libstdc++-v3/testsuite/demangle/regression/cw-03.cc
new file mode 100644
index 00000000000..0ab62327e4e
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-03.cc
@@ -0,0 +1,54 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+namespace libcw {
+ namespace _private_ {
+ class GlobalObject { public: void dummy(std::ostream&) const; };
+ }
+ namespace debug {
+ template<typename T>
+ class cwprint_using_tct { };
+ template<typename T>
+ cwprint_using_tct<T> cwprint_using(T const&, void (T::*)(std::ostream&) const);
+ }
+}
+
+void h(void)
+{
+ // Instantiation.
+ libcw::_private_::GlobalObject dummy;
+ (void)libcw::debug::cwprint_using(dummy, &libcw::_private_::GlobalObject::dummy);
+}
+*/
+ // cplus-dem CORE
+ verify_demangle("_ZN5libcw5debug13cwprint_usingINS_9_private_12GlobalObjectEEENS0_17cwprint_using_tctIT_EERKS5_MS5_KFvRSt7ostreamE", "libcw::debug::cwprint_using_tct<libcw::_private_::GlobalObject> libcw::debug::cwprint_using<libcw::_private_::GlobalObject>(libcw::_private_::GlobalObject const&, void (libcw::_private_::GlobalObject::*)(std::ostream&) const)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-04.cc b/libstdc++-v3/testsuite/demangle/regression/cw-04.cc
new file mode 100644
index 00000000000..d2a7c09cdbc
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-04.cc
@@ -0,0 +1,45 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+
+/*
+class timer_event_request_base_ct { };
+struct timer_greater { };
+
+void i(void)
+{
+ // Instantiation.
+ std::priority_queue<timer_event_request_base_ct*, std::deque<timer_event_request_base_ct*>, timer_greater> dummy;
+ dummy.top();
+}
+*/
+ verify_demangle("_ZNKSt14priority_queueIP27timer_event_request_base_ctSt5dequeIS1_SaIS1_EE13timer_greaterE3topEv", "std::priority_queue<timer_event_request_base_ct*, std::deque<timer_event_request_base_ct*, std::allocator<timer_event_request_base_ct*> >, timer_greater>::top() const");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-05.cc b/libstdc++-v3/testsuite/demangle/regression/cw-05.cc
new file mode 100644
index 00000000000..e56c834aeb5
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-05.cc
@@ -0,0 +1,51 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+struct memory_block_st { };
+namespace std {
+ template<typename T, typename R = T const&, typename P = T const*>
+ class _Deque_iterator {
+ public:
+ void operator==(_Deque_iterator const&) const { }
+ };
+}
+
+void j(void)
+{
+ // Instantiation.
+ std::_Deque_iterator<memory_block_st*> dummy;
+ dummy.operator==(dummy);
+}
+*/
+ verify_demangle("_ZNKSt15_Deque_iteratorIP15memory_block_stRKS1_PS2_EeqERKS5_",
+ "std::_Deque_iterator<memory_block_st*, memory_block_st* const&, memory_block_st* const*>::operator==(std::_Deque_iterator<memory_block_st*, memory_block_st* const&, memory_block_st* const*> const&) const");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-06.cc b/libstdc++-v3/testsuite/demangle/regression/cw-06.cc
new file mode 100644
index 00000000000..5c22d177d9b
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-06.cc
@@ -0,0 +1,51 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+struct option { };
+namespace std {
+ template<typename T1, typename T2>
+ class __normal_iterator {
+ public:
+ void operator-(__normal_iterator const&) const { }
+ };
+}
+
+void k(void)
+{
+ // Instantiation.
+ std::__normal_iterator<option const*, std::vector<option> > dummy;
+ dummy.operator-(dummy);
+}
+*/
+ verify_demangle("_ZNKSt17__normal_iteratorIPK6optionSt6vectorIS0_SaIS0_EEEmiERKS6_",
+ "std::__normal_iterator<option const*, std::vector<option, std::allocator<option> > >::operator-(std::__normal_iterator<option const*, std::vector<option, std::allocator<option> > > const&) const");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-07.cc b/libstdc++-v3/testsuite/demangle/regression/cw-07.cc
new file mode 100644
index 00000000000..25f3661fe50
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-07.cc
@@ -0,0 +1,62 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+
+/*
+
+namespace libcw {
+ namespace debug {
+ class no_alloc_checking_allocator { };
+ }
+}
+namespace std {
+ template<typename T>
+ class char_traits { };
+ template<typename T, class _Traits, class _Alloc>
+ class basic_string {
+ public:
+ template<typename T2>
+ char* _S_construct(T2, T2, _Alloc const&) { return (char*)0; }
+ };
+}
+
+void l(void)
+{
+ // Instantiation.
+ std::basic_string<char, std::char_traits<char>,
+ libcw::debug::no_alloc_checking_allocator> dummy;
+ char* cp;
+ libcw::debug::no_alloc_checking_allocator alloc;
+ dummy._S_construct(cp, cp, alloc);
+}
+*/
+ verify_demangle("_ZNSbIcSt11char_traitsIcEN5libcw5debug27no_alloc_checking_allocatorEE12_S_constructIPcEES6_T_S7_RKS3_", "char* std::basic_string<char, std::char_traits<char>, libcw::debug::no_alloc_checking_allocator>::_S_construct<char*>(char*, char*, libcw::debug::no_alloc_checking_allocator const&)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-08.cc b/libstdc++-v3/testsuite/demangle/regression/cw-08.cc
new file mode 100644
index 00000000000..25280a5151c
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-08.cc
@@ -0,0 +1,54 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+class A { };
+typedef A const* a4_t[4];
+typedef a4_t* ap4_t;
+class C {
+public:
+ ap4_t c;
+};
+template<typename T1, typename T2, typename T3>
+ void f(T1, T2, T3, ap4_t, ap4_t (C::*)) { }
+
+void m(void)
+{
+ // Instantiation.
+ A a;
+ a4_t a4;
+ f(a, &a, static_cast<A const*>(&a), &a4, &C::c);
+}
+*/
+ // Equivalent, spacing differences with icc.
+ // cplus-dem FAIL
+ verify_demangle("_Z1fI1APS0_PKS0_EvT_T0_T1_PA4_S3_M1CS8_", "void f<A, A*, A const*>(A, A*, A const*, A const* (*) [4], A const* (* C::*) [4])");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-09.cc b/libstdc++-v3/testsuite/demangle/regression/cw-09.cc
new file mode 100644
index 00000000000..0ad38f1d291
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-09.cc
@@ -0,0 +1,62 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+
+/*
+
+void foo(int, int*, int**, int***, int****, int*****, int******, int*******, int********, int*********, int**********, int***********, int************, int*************, int**************, int***************)
+{
+}
+
+void n(void)
+{
+ int i0;
+ int* i1;
+ int** i2;
+ int*** i3;
+ int**** i4;
+ int***** i5;
+ int****** i6;
+ int******* i7;
+ int******** i8;
+ int********* i9;
+ int********** i10;
+ int*********** i11;
+ int************ i12;
+ int************* i13;
+ int************** i14;
+ int*************** i15;
+ foo(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);
+}
+*/
+ // cplus-dem FAIL
+ verify_demangle("_Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_", "foo(int, int*, int**, int***, int****, int*****, int******, int*******, int********, int*********, int**********, int***********, int************, int*************, int**************, int***************)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-10.cc b/libstdc++-v3/testsuite/demangle/regression/cw-10.cc
new file mode 100644
index 00000000000..ab0da2af05f
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-10.cc
@@ -0,0 +1,52 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+
+/*
+
+namespace std {
+ template<typename T1, typename T2, typename T3>
+ class D { };
+ D<A*, A*&, A**> d;
+ template<typename T1, typename T2, typename T3>
+ D<T3, T3&, T3*> B(T1, T1, T2, T3*) { return d; }
+}
+
+void o(void)
+{
+ std::D<A*, A* const&, A* const*> dummy1;
+ std::D<A*, A*&, A**> dummy2;
+ A* dummy3;
+ std::B(dummy1, dummy1, dummy2, &dummy3);
+}
+*/
+
+ verify_demangle("_ZSt1BISt1DIP1ARKS2_PS3_ES0_IS2_RS2_PS2_ES2_ET0_T_SB_SA_PT1_", "std::D<A*, A*&, A**> std::B<std::D<A*, A* const&, A* const*>, std::D<A*, A*&, A**>, A*>(std::D<A*, A* const&, A* const*>, std::D<A*, A* const&, A* const*>, std::D<A*, A*&, A**>, A**)");
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-11.cc b/libstdc++-v3/testsuite/demangle/regression/cw-11.cc
new file mode 100644
index 00000000000..d763e8c56af
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-11.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem CORE
+ verify_demangle("_X11TransParseAddress", "_X11TransParseAddress");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-12.cc b/libstdc++-v3/testsuite/demangle/regression/cw-12.cc
new file mode 100644
index 00000000000..cb6a40ee548
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-12.cc
@@ -0,0 +1,88 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+namespace std {
+ template<bool b, int i>
+ class __default_alloc_template { };
+
+ template<typename CHAR>
+ class string_char_traits { };
+
+ template<class BASIC_STRING, class ADAPTOR>
+ struct _Alloc_traits {
+ static char _S_instanceless;
+ };
+ template<class BASIC_STRING, class ADAPTOR>
+ char _Alloc_traits<BASIC_STRING, ADAPTOR>::_S_instanceless;
+}
+namespace libcw {
+ namespace debug {
+ namespace _private_ {
+ template<typename CHAR, class ALLOCATOR, bool b>
+ class allocator_adaptor { };
+ }
+ }
+}
+
+char x;
+void q(void)
+{
+ std::_Alloc_traits<
+ std::basic_string<
+ char,
+ std::string_char_traits<char>,
+ libcw::debug::_private_::allocator_adaptor<
+ char,
+ std::__default_alloc_template<false, 327664>,
+ true
+ >
+ >,
+ libcw::debug::_private_::allocator_adaptor<
+ std::basic_string<
+ char,
+ std::string_char_traits<char>,
+ libcw::debug::_private_::allocator_adaptor<
+ char,
+ std::__default_alloc_template<false, 327664>,
+ true
+ >
+ >,
+ std::__default_alloc_template<false, 327664>,
+ true
+ >
+ > dummy1;
+ x = dummy1._S_instanceless;
+}
+*/
+ // cplus-dem FAIL
+ verify_demangle("_ZNSt13_Alloc_traitsISbIcSt18string_char_traitsIcEN5libcw5debug9_private_17allocator_adaptorIcSt24__default_alloc_templateILb0ELi327664EELb1EEEENS5_IS9_S7_Lb1EEEE15_S_instancelessE","std::_Alloc_traits<std::basic_string<char, std::string_char_traits<char>, libcw::debug::_private_::allocator_adaptor<char, std::__default_alloc_template<false, 327664>, true> >, libcw::debug::_private_::allocator_adaptor<std::basic_string<char, std::string_char_traits<char>, libcw::debug::_private_::allocator_adaptor<char, std::__default_alloc_template<false, 327664>, true> >, std::__default_alloc_template<false, 327664>, true> >::_S_instanceless");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-13.cc b/libstdc++-v3/testsuite/demangle/regression/cw-13.cc
new file mode 100644
index 00000000000..8fe07fd44a6
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-13.cc
@@ -0,0 +1,34 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+ // cplus-dem CORE
+ verify_demangle("_GLOBAL__I__Z2fnv", "global constructors keyed to fn()");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/cw-14.cc b/libstdc++-v3/testsuite/demangle/regression/cw-14.cc
new file mode 100644
index 00000000000..613c0c8b32c
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/cw-14.cc
@@ -0,0 +1,72 @@
+// 2003-02-26 Carlo Wood <carlo@alinoe.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// libcwd tests
+int main()
+{
+ using namespace __gnu_cxx_test;
+
+/*
+struct G {
+ int m(void) const { return 0; }
+ int n(void) { return 0; }
+};
+
+struct H {
+ int m(void) const { return 0; }
+ int n(void) { return 0; }
+};
+
+template<typename T>
+ class what
+ {
+ };
+
+template<typename T>
+ class what2
+ {
+ };
+
+void r(int (G::*)(void),
+ int (G::*)(void) const,
+ G, // S_
+ int (H::*)(void), // M1HS0_
+ int (G::*)(void), // S1_
+ what<G const>, // what<S2_>
+ what2<G const>, // what2<S8_>
+ int (G::*)(void) const // S3_
+{
+ G g;
+ what<G const> y;
+ what2<G const> y2;
+ r(&G::n, &G::m, g, &H::n, &G::n, y, y2, &G::m);
+}
+*/
+
+ // cplus-dem CORE
+verify_demangle("_Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_",
+ "r(int (G::*)(), int (G::*)() const, G, int (H::*)(), int (G::*)(), what<G const>, what2<G const>, int (G::*)() const)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/demangle/regression/old.cc b/libstdc++-v3/testsuite/demangle/regression/old.cc
new file mode 100644
index 00000000000..7bb8484d78c
--- /dev/null
+++ b/libstdc++-v3/testsuite/demangle/regression/old.cc
@@ -0,0 +1,31 @@
+// 2003-02-26 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+// old libiberty tests for gnu-v3
+int main()
+{
+ using namespace __gnu_cxx_test;
+ verify_demangle("St9bad_alloc", "std::bad_alloc");
+ return 0;
+}
OpenPOWER on IntegriCloud