From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../testsuite/abi/demangle/abi_examples/01.cc | 38 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/02.cc | 38 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/03.cc | 40 +++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/04.cc | 36 +++++++++++++++++ .../testsuite/abi/demangle/abi_examples/05.cc | 35 +++++++++++++++++ .../testsuite/abi/demangle/abi_examples/06.cc | 35 +++++++++++++++++ .../testsuite/abi/demangle/abi_examples/07.cc | 35 +++++++++++++++++ .../testsuite/abi/demangle/abi_examples/08.cc | 34 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/09.cc | 34 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/10.cc | 39 +++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/11.cc | 37 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/12.cc | 38 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/13.cc | 38 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/14.cc | 39 +++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/15.cc | 39 +++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/16.cc | 45 ++++++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/17.cc | 39 +++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/18.cc | 41 ++++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/19.cc | 33 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/20.cc | 34 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/21.cc | 34 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/22.cc | 34 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/23.cc | 33 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/24.cc | 33 ++++++++++++++++ .../testsuite/abi/demangle/abi_examples/25.cc | 38 ++++++++++++++++++ .../testsuite/abi/demangle/abi_examples/26.cc | 33 ++++++++++++++++ 26 files changed, 952 insertions(+) create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/01.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/02.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/03.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/04.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/05.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/06.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/07.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/08.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/09.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/10.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/11.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/12.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/13.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/15.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/16.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/17.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/18.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/19.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/20.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/21.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/22.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/23.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/24.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/25.cc create mode 100644 libstdc++-v3/testsuite/abi/demangle/abi_examples/26.cc (limited to 'libstdc++-v3/testsuite/abi/demangle/abi_examples') diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/01.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/01.cc new file mode 100644 index 000000000..45c012d0f --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/01.cc @@ -0,0 +1,38 @@ +// 2003-02-26 Benjamin Kosnik + +// Copyright (C) 2003, 2005, 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // extern "C" function + // extern "C" float f(void) { }; + // T f + // f is ambiguous between "C" external name and internal built-in type + // name. The ambiguity is resolved to the built-in type name. + verify_demangle("f", "float"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/02.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/02.cc new file mode 100644 index 000000000..c20f44a2a --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/02.cc @@ -0,0 +1,38 @@ +// 2003-02-26 Benjamin Kosnik + +// Copyright (C) 2003, 2005, 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // or variable "f" + // int f; + // B f + // f is ambiguous between variable external name and internal built-in type + // name. The ambiguity is resolved to the built-in type name. + verify_demangle("f", "float"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/03.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/03.cc new file mode 100644 index 000000000..1006d2b8d --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/03.cc @@ -0,0 +1,40 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // or a global namespace variable "f" + /* + namespace f + { + int f; + } + */ + verify_demangle("_ZN1f1fE", "f::f"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/04.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/04.cc new file mode 100644 index 000000000..553f6b86d --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/04.cc @@ -0,0 +1,36 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // void f() { }; + // int f() { }; + // verify_demangle("_Z1fv", "f(void)"); + verify_demangle("_Z1fv", "f()"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/05.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/05.cc new file mode 100644 index 000000000..0db11ea61 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/05.cc @@ -0,0 +1,35 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // void f(int) { }; + // int f(int) { }; + verify_demangle("_Z1fi", "f(int)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/06.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/06.cc new file mode 100644 index 000000000..445b985b5 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/06.cc @@ -0,0 +1,35 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // class bar { }; + // void foo(bar) { }; + verify_demangle("_Z3foo3bar", "foo(bar)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/07.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/07.cc new file mode 100644 index 000000000..e2765e42a --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/07.cc @@ -0,0 +1,35 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // class X { }; + // int operator%(X, X) { }; + verify_demangle("_Zrm1XS_", "operator%(X, X)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/08.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/08.cc new file mode 100644 index 000000000..15b5c9b7e --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/08.cc @@ -0,0 +1,34 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // int operator+(X&, X&) { }; + verify_demangle("_ZplR1XS0_", "operator+(X&, X&)"); // XXX + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/09.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/09.cc new file mode 100644 index 000000000..db1705155 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/09.cc @@ -0,0 +1,34 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // int operator<< (X const&, X const&) { }; + verify_demangle("_ZlsRK1XS1_", "operator<<(X const&, X const&)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/10.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/10.cc new file mode 100644 index 000000000..6d0e06fef --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/10.cc @@ -0,0 +1,39 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + template + class Foo + { static int bar; }; + int Foo::bar; + */ + verify_demangle("_ZN3FooIA4_iE3barE", "Foo::bar"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/11.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/11.cc new file mode 100644 index 000000000..03bb29ec7 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/11.cc @@ -0,0 +1,37 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // template void f(int) { } + // template void f(int); + // NB: the return type is always explicitly encoded for template + // functions taking parameters. + verify_demangle("_Z1fIiEvi", "void f(int)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/12.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/12.cc new file mode 100644 index 000000000..c01255be8 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/12.cc @@ -0,0 +1,38 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + class Duo { }; + template void first(Duo) { } + template void first(Duo); + */ + verify_demangle("_Z5firstI3DuoEvS0_", "void first(Duo)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/13.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/13.cc new file mode 100644 index 000000000..6da15c32f --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/13.cc @@ -0,0 +1,38 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + class Duo { }; + template void first(T obj) { } + template void first(Duo); + */ + verify_demangle("_Z5firstI3DuoEvT_", "void first(Duo)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc new file mode 100644 index 000000000..98b998786 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc @@ -0,0 +1,39 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + typedef void fun(double); + template void foo() { } + template void foo(); + */ + //demangle("_Z3fooIiPFidEiEvv", "void foo(void)"); + verify_demangle("_Z3fooIiFvdEiEvv", "void foo()"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/15.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/15.cc new file mode 100644 index 000000000..d1909bbab --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/15.cc @@ -0,0 +1,39 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + namespace N + { + int f; + } + */ + verify_demangle("_ZN1N1fE", "N::f"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/16.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/16.cc new file mode 100644 index 000000000..2433f51bd --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/16.cc @@ -0,0 +1,45 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + namespace System + { + struct Sound + { + int beep(); + }; + + int Sound::beep() { }; + } + */ + // verify_demangle("_ZN6System5Sound4beepEv", "System::Sound::beep(void)"); + verify_demangle("_ZN6System5Sound4beepEv", "System::Sound::beep()"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/17.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/17.cc new file mode 100644 index 000000000..7431dbd08 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/17.cc @@ -0,0 +1,39 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + namespace Arena + { + int level; + } + */ + verify_demangle("_ZN5Arena5levelE", "Arena::level"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/18.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/18.cc new file mode 100644 index 000000000..3098e306b --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/18.cc @@ -0,0 +1,41 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + /* + template struct Stack + { + static int level; + int return_level() { return level; } + }; + template struct Stack; + */ + verify_demangle("_ZN5StackIiiE5levelE", "Stack::level"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/19.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/19.cc new file mode 100644 index 000000000..bafb9069d --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/19.cc @@ -0,0 +1,33 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_Z1fI1XEvPVN1AIT_E1TE", "void f(A::T volatile*)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/20.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/20.cc new file mode 100644 index 000000000..cb9f58c44 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/20.cc @@ -0,0 +1,34 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_ZngILi42EEvN1AIXplT_Li2EEE1TE", + "void operator-<42>(A<(42)+(2)>::T)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/21.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/21.cc new file mode 100644 index 000000000..a3689d450 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/21.cc @@ -0,0 +1,34 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_Z4makeI7FactoryiET_IT0_Ev", + "Factory make()"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/22.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/22.cc new file mode 100644 index 000000000..a3689d450 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/22.cc @@ -0,0 +1,34 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_Z4makeI7FactoryiET_IT0_Ev", + "Factory make()"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/23.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/23.cc new file mode 100644 index 000000000..0b404cc84 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/23.cc @@ -0,0 +1,33 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_Z3foo5Hello5WorldS0_S_", + "foo(Hello, World, World, Hello)"); + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/24.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/24.cc new file mode 100644 index 000000000..1a70c763d --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/24.cc @@ -0,0 +1,33 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_Z3fooPM2ABi", "foo(int AB::**)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/25.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/25.cc new file mode 100644 index 000000000..ba4c3aa4e --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/25.cc @@ -0,0 +1,38 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + // Equivalent + // uncompressed, cp-dem + // verify_demangle("_ZlsRSoRKSs", "operator<<(std::basic_ostream >&, std::basic_string, std::allocator > const&)"); + // compressed (good!), new __cxa_demangle + verify_demangle("_ZlsRSoRKSs", + "operator<<(std::ostream&, std::string const&)"); + + return 0; +} diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/26.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/26.cc new file mode 100644 index 000000000..b55852795 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/26.cc @@ -0,0 +1,33 @@ +// 2003-02-26 Benjamin Kosnik + +// 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 +// . + +// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling) + +#include + +// Examples given in the IA64 C++ ABI +// http://www.codesourcery.com/cxx-abi/abi-examples.html#mangling +int main() +{ + using namespace __gnu_test; + + verify_demangle("_ZTI7a_class", "typeinfo for a_class"); + + return 0; +} -- cgit v1.2.3