diff options
Diffstat (limited to 'libstdc++-v3/testsuite/29_atomics')
44 files changed, 1612 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc new file mode 100644 index 000000000..68b64f020 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc @@ -0,0 +1,32 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::assignable test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl()); + return 0; +} + +// { dg-error "deleted" "" { target *-*-* } 572 } +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/constexpr.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/constexpr.cc new file mode 100644 index 000000000..875c54900 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/constexpr.cc @@ -0,0 +1,32 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::constexpr_single_value_constructible test; + + // test.operator()<std::atomic<int>, int>(); + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_list.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_list.cc new file mode 100644 index 000000000..142a5a149 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_list.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::copy_list_initializable test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc new file mode 100644 index 000000000..79182bba3 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc @@ -0,0 +1,32 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::copy_constructible test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl()); + return 0; +} + +// { dg-error "deleted" "" { target *-*-* } 611 } +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/default.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/default.cc new file mode 100644 index 000000000..bdad02b47 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/default.cc @@ -0,0 +1,28 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::default_constructible test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/direct_list.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/direct_list.cc new file mode 100644 index 000000000..b6ac8e1b9 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/direct_list.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::direct_list_initializable test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/single_value.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/single_value.cc new file mode 100644 index 000000000..755782034 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/single_value.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::single_value_constructible test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc new file mode 100644 index 000000000..4ace9f0cd --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc @@ -0,0 +1,39 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do link { xfail *-*-* } } + +// Copyright (C) 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +struct dwordp +{ + int* p1; + int* p2; +}; + +void atomics() +{ + std::atomic<dwordp> a; + bool b = a.is_lock_free(); // { dg-excess-errors "undefined reference to" } +} + +int main() +{ + atomics(); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_assignment.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_assignment.cc new file mode 100644 index 000000000..6acf7c847 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_assignment.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_hooks.h> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::integral_assignable test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_conversion.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_conversion.cc new file mode 100644 index 000000000..1c9c768d5 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_conversion.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_hooks.h> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::integral_convertable test; + __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/base_classes.cc b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/base_classes.cc new file mode 100644 index 000000000..946f833d1 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/base_classes.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +void test01() +{ + // Check for required base class. + __gnu_test::has_required_base_class test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::atomics_tl()); +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/explicit_instantiation/1.cc new file mode 100644 index 000000000..72bd5dd3a --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic/requirements/explicit_instantiation/1.cc @@ -0,0 +1,27 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// This file tests explicit instantiation of basic_string + +#include <atomic> +#include <testsuite_character.h> + +template class std::atomic<__gnu_test::pod_char>; +template class std::atomic<__gnu_test::pod_char*>; diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc new file mode 100644 index 000000000..36dc5fcf4 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_hooks.h> + +int main() +{ + bool test __attribute__((unused)) = true; + std::atomic_flag f = ATOMIC_FLAG_INIT; + + f.clear(); // set to false + VERIFY( false == f.test_and_set() ); // return previous false, set to true + VERIFY( true == f.test_and_set() ); // return true + + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/1.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/1.cc new file mode 100644 index 000000000..b91de1126 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/1.cc @@ -0,0 +1,27 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +void test01() +{ + using namespace std; + atomic_flag af __attribute__((unused)) = ATOMIC_FLAG_INIT; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc new file mode 100644 index 000000000..1ad8bc4d4 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc @@ -0,0 +1,28 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +int main() +{ + // Only safe usage. + std::atomic_flag guard __attribute__((unused)) = ATOMIC_FLAG_INIT; + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc new file mode 100644 index 000000000..27c60ca2d --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc @@ -0,0 +1,32 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +void test01() +{ + // Assign. + typedef std::atomic_flag test_type; + test_type t1; + test_type t2; + t1 = t2; // { dg-error "deleted" } +} + +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc new file mode 100644 index 000000000..9244f683d --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +void test01() +{ + // Copy. + typedef std::atomic_flag test_type; + test_type t1; + test_type t2(t1); // { dg-error "deleted" } +} + +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc new file mode 100644 index 000000000..38b6544e3 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc @@ -0,0 +1,27 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +int main() +{ + // Default constructor. + std::atomic_flag a __attribute__((unused)); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc new file mode 100644 index 000000000..362b8d46a --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc @@ -0,0 +1,28 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +void test01() +{ + __gnu_test::standard_layout test; + test.operator()<std::atomic_flag>(); +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc new file mode 100644 index 000000000..41e275c29 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc @@ -0,0 +1,28 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +void test01() +{ + __gnu_test::has_trivial_cons_dtor test; + test.operator()<std::atomic_flag>(); +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc new file mode 100644 index 000000000..ef69e02de --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +int main() +{ + using namespace std; + atomic_flag af = ATOMIC_FLAG_INIT; + + if (!af.test_and_set(memory_order_acquire)) + af.clear(memory_order_release); + + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc new file mode 100644 index 000000000..825174d39 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +int main() +{ + using namespace std; + atomic_flag af = ATOMIC_FLAG_INIT; + + if (!af.test_and_set()) + af.clear(); + + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc new file mode 100644 index 000000000..306fd4c89 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::assignable test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type()); + return 0; +} + +// { dg-error "deleted" "" { target *-*-* } 572 } +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/constexpr.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/constexpr.cc new file mode 100644 index 000000000..a91db8d66 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/constexpr.cc @@ -0,0 +1,31 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::constexpr_single_value_constructible test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_list.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_list.cc new file mode 100644 index 000000000..f2456360e --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_list.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::copy_list_initializable test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc new file mode 100644 index 000000000..56a41d1f2 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::copy_constructible test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type()); + return 0; +} + +// { dg-error "deleted" "" { target *-*-* } 611 } +// { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/default.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/default.cc new file mode 100644 index 000000000..613e935c8 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/default.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::default_constructible test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/direct_list.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/direct_list.cc new file mode 100644 index 000000000..3e8f9c3f8 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/direct_list.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::direct_list_initializable test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/single_value.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/single_value.cc new file mode 100644 index 000000000..8787a1596 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/single_value.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::single_value_constructible test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise.cc new file mode 100644 index 000000000..99940b8d2 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::has_bitwise_operators test; + using __gnu_test::atomic_integrals_no_bool; + __gnu_cxx::typelist::apply_generator(test, atomic_integrals_no_bool::type()); +}; diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc new file mode 100644 index 000000000..4ee4e7fd6 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::bitwise_assignment_operators<std::atomic_bool>(); + return 0; +} + +// { dg-error "operator" "" { target *-*-* } 428 } +// { dg-error "operator" "" { target *-*-* } 429 } +// { dg-error "operator" "" { target *-*-* } 430 } +// { dg-excess-errors "In file included from" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement.cc new file mode 100644 index 000000000..fd2664412 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::has_decrement_operators test; + using __gnu_test::atomic_integrals_no_bool; + __gnu_cxx::typelist::apply_generator(test, atomic_integrals_no_bool::type()); +}; diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc new file mode 100644 index 000000000..3e0a97578 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::has_decrement_operators test; + test.operator()<std::atomic_bool>(); + return 0; +} + +// { dg-error "operator" "" { target *-*-* } 385 } +// { dg-error "operator" "" { target *-*-* } 386 } +// { dg-error "operator" "" { target *-*-* } 387 } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment.cc new file mode 100644 index 000000000..e1e869097 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::has_increment_operators test; + using __gnu_test::atomic_integrals_no_bool; + __gnu_cxx::typelist::apply_generator(test, atomic_integrals_no_bool::type()); +}; diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc new file mode 100644 index 000000000..5047be798 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// -*- C++ -*- + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 3, or (at +// your option) any later version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::has_increment_operators test; + test.operator()<std::atomic_bool>(); + return 0; +} + +// { dg-error "operator" "" { target *-*-* } 363 } +// { dg-error "operator" "" { target *-*-* } 364 } +// { dg-error "operator" "" { target *-*-* } 365 } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_assignment.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_assignment.cc new file mode 100644 index 000000000..728b53a16 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_assignment.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_hooks.h> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::integral_assignable test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_conversion.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_conversion.cc new file mode 100644 index 000000000..ab642f3e6 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_conversion.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_hooks.h> +#include <testsuite_common_types.h> + +int main() +{ + __gnu_test::integral_convertable test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type(), + __gnu_test::integral_types::type()); + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/standard_layout.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/standard_layout.cc new file mode 100644 index 000000000..66e231b84 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/standard_layout.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } +// 2008-10-22 Benjamin Kosnik <bkoz@redhat.com> + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +void test01() +{ + // Check for standard layout requirements + __gnu_test::standard_layout test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type()); +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc new file mode 100644 index 000000000..f75fcb0e4 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> +#include <testsuite_common_types.h> + +void test01() +{ + __gnu_test::has_trivial_cons_dtor test; + __gnu_cxx::typelist::apply_generator(test, + __gnu_test::atomic_integrals::type()); +} diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc new file mode 100644 index 000000000..7af4369aa --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc @@ -0,0 +1,49 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +namespace gnu +{ + using std::atomic_flag_test_and_set; + using std::atomic_flag_test_and_set_explicit; + using std::atomic_flag_clear; + using std::atomic_flag_clear_explicit; + + using std::kill_dependency; + + // Sloppy testing for integral types (en masse). + using std::atomic_is_lock_free; + using std::atomic_store; + using std::atomic_store_explicit; + using std::atomic_load; + using std::atomic_load_explicit; + using std::atomic_exchange; + using std::atomic_exchange_explicit; + using std::atomic_compare_exchange_weak; + using std::atomic_compare_exchange_strong; + using std::atomic_compare_exchange_weak_explicit; + using std::atomic_compare_exchange_strong_explicit; + + using std::atomic_fetch_add; + using std::atomic_fetch_add_explicit; + using std::atomic_fetch_sub; + using std::atomic_fetch_sub_explicit; +} diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/macros.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/macros.cc new file mode 100644 index 000000000..e2461a111 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/macros.cc @@ -0,0 +1,104 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +namespace gnu +{ +#ifndef ATOMIC_CHAR_LOCK_FREE +# error "ATOMIC_CHAR_LOCK_FREE must be a macro" +#else +# if ATOMIC_CHAR_LOCK_FREE != 0 \ + && ATOMIC_CHAR_LOCK_FREE != 1 && ATOMIC_CHAR_LOCK_FREE != 2 +# error "ATOMIC_CHAR_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_CHAR16_T_LOCK_FREE +# error "ATOMIC_CHAR16_T_LOCK_FREE must be a macro" +#else +# if ATOMIC_CHAR16_T_LOCK_FREE != 0 \ + && ATOMIC_CHAR16_T_LOCK_FREE != 1 && ATOMIC_CHAR16_T_LOCK_FREE != 2 +# error "ATOMIC_CHAR16_T_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_CHAR32_T_LOCK_FREE +# error "ATOMIC_CHAR32_T_LOCK_FREE must be a macro" +#else +# if ATOMIC_CHAR32_T_LOCK_FREE != 0 \ + && ATOMIC_CHAR32_T_LOCK_FREE != 1 && ATOMIC_CHAR32_T_LOCK_FREE != 2 +# error "ATOMIC_CHAR32_T_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_WCHAR_T_LOCK_FREE +# error "ATOMIC_WCHAR_T_LOCK_FREE must be a macro" +#else +# if ATOMIC_WCHAR_T_LOCK_FREE != 0 \ + && ATOMIC_WCHAR_T_LOCK_FREE != 1 && ATOMIC_WCHAR_T_LOCK_FREE != 2 +# error "ATOMIC_WCHAR_T_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_SHORT_LOCK_FREE +# error "ATOMIC_SHORT_LOCK_FREE must be a macro" +#else +# if ATOMIC_SHORT_LOCK_FREE != 0 \ + && ATOMIC_SHORT_LOCK_FREE != 1 && ATOMIC_SHORT_LOCK_FREE != 2 +# error "ATOMIC_SHORT_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_INT_LOCK_FREE +# error "ATOMIC_INT_LOCK_FREE must be a macro" +#else +# if ATOMIC_INT_LOCK_FREE != 0 \ + && ATOMIC_INT_LOCK_FREE != 1 && ATOMIC_INT_LOCK_FREE != 2 +# error "ATOMIC_INT_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_LONG_LOCK_FREE +# error "ATOMIC_LONG_LOCK_FREE must be a macro" +#else +# if ATOMIC_LONG_LOCK_FREE != 0 \ + && ATOMIC_LONG_LOCK_FREE != 1 && ATOMIC_LONG_LOCK_FREE != 2 +# error "ATOMIC_LONG_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_LLONG_LOCK_FREE +# error "ATOMIC_LLONG_LOCK_FREE must be a macro" +#else +# if ATOMIC_LLONG_LOCK_FREE != 0 \ + && ATOMIC_LLONG_LOCK_FREE != 1 && ATOMIC_LLONG_LOCK_FREE != 2 +# error "ATOMIC_LLONG_LOCK_FREE must be 0, 1, or 2" +# endif +#endif + +#ifndef ATOMIC_FLAG_INIT + #error "ATOMIC_FLAG_INIT_must_be_a_macro" +#endif + +#ifndef ATOMIC_VAR_INIT + #error "ATOMIC_VAR_INIT_must_be_a_macro" +#endif +} diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc new file mode 100644 index 000000000..be390b0f7 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc @@ -0,0 +1,26 @@ +// { dg-do compile } +// { dg-options "-std=gnu++98" } + +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> // { dg-excess-errors "In file included from" } + +// { dg-error "upcoming ISO" "" { target *-*-* } 32 } + + + diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc new file mode 100644 index 000000000..772bc338e --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc @@ -0,0 +1,75 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +void test01() +{ + using std::memory_order; + using std::memory_order_relaxed; + using std::memory_order_consume; + using std::memory_order_acquire; + using std::memory_order_release; + using std::memory_order_acq_rel; + using std::memory_order_seq_cst; + + using std::atomic_flag; + + // atomics for builtins types + using std::atomic_bool; + using std::atomic_char; + using std::atomic_schar; + using std::atomic_uchar; + using std::atomic_short; + using std::atomic_ushort; + using std::atomic_int; + using std::atomic_uint; + using std::atomic_long; + using std::atomic_ulong; + using std::atomic_llong; + using std::atomic_ullong; + using std::atomic_wchar_t; + using std::atomic_char16_t; + using std::atomic_char32_t; + + // atomics for standard typedefs + using std::atomic_int_least8_t; + using std::atomic_uint_least8_t; + using std::atomic_int_least16_t; + using std::atomic_uint_least16_t; + using std::atomic_int_least32_t; + using std::atomic_uint_least32_t; + using std::atomic_int_least64_t; + using std::atomic_uint_least64_t; + using std::atomic_int_fast8_t; + using std::atomic_uint_fast8_t; + using std::atomic_int_fast16_t; + using std::atomic_uint_fast16_t; + using std::atomic_int_fast32_t; + using std::atomic_uint_fast32_t; + using std::atomic_int_fast64_t; + using std::atomic_uint_fast64_t; + using std::atomic_intptr_t; + using std::atomic_uintptr_t; + using std::atomic_size_t; + using std::atomic_ptrdiff_t; + using std::atomic_intmax_t; + using std::atomic_uintmax_t; +} diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc new file mode 100644 index 000000000..579077343 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc @@ -0,0 +1,170 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <atomic> + +void test01() +{ + // Not global scoped, only namespace std. + using memory_order; + using memory_order_relaxed; + using memory_order_consume; + using memory_order_acquire; + using memory_order_release; + using memory_order_acq_rel; + using memory_order_seq_cst; + + using atomic_flag; + + using atomic_bool; + using atomic_char; + using atomic_schar; + using atomic_uchar; + using atomic_short; + using atomic_ushort; + using atomic_int; + using atomic_uint; + using atomic_long; + using atomic_ulong; + using atomic_llong; + using atomic_ullong; + using atomic_wchar_t; + using atomic_char16_t; + using atomic_char32_t; + + using atomic_int_least8_t; + using atomic_uint_least8_t; + using atomic_int_least16_t; + using atomic_uint_least16_t; + using atomic_int_least32_t; + using atomic_uint_least32_t; + using atomic_int_least64_t; + using atomic_uint_least64_t; + using atomic_int_fast8_t; + using atomic_uint_fast8_t; + using atomic_int_fast16_t; + using atomic_uint_fast16_t; + using atomic_int_fast32_t; + using atomic_uint_fast32_t; + using atomic_int_fast64_t; + using atomic_uint_fast64_t; + using atomic_intptr_t; + using atomic_uintptr_t; + using atomic_size_t; + using atomic_ptrdiff_t; + using atomic_intmax_t; + using atomic_uintmax_t; + + using atomic_address; +} + +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 26 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 27 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 28 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 29 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 30 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 31 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 32 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 34 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 36 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 37 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 38 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 39 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 40 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 41 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 42 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 43 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 44 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 45 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 46 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 47 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 48 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 49 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 50 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 52 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 53 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 54 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 55 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 56 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 57 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 58 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 59 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 60 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 61 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 62 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 63 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 64 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 65 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 66 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 67 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 68 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 69 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 70 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 71 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 72 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 73 } +// { dg-error "expected nested-name-specifier" "" { target *-*-* } 75 } + +// { dg-error "declared" "" { target *-*-* } 26 } +// { dg-error "declared" "" { target *-*-* } 27 } +// { dg-error "declared" "" { target *-*-* } 28 } +// { dg-error "declared" "" { target *-*-* } 29 } +// { dg-error "declared" "" { target *-*-* } 30 } +// { dg-error "declared" "" { target *-*-* } 31 } +// { dg-error "declared" "" { target *-*-* } 32 } +// { dg-error "declared" "" { target *-*-* } 34 } +// { dg-error "declared" "" { target *-*-* } 36 } +// { dg-error "declared" "" { target *-*-* } 37 } +// { dg-error "declared" "" { target *-*-* } 38 } +// { dg-error "declared" "" { target *-*-* } 39 } +// { dg-error "declared" "" { target *-*-* } 40 } +// { dg-error "declared" "" { target *-*-* } 41 } +// { dg-error "declared" "" { target *-*-* } 42 } +// { dg-error "declared" "" { target *-*-* } 43 } +// { dg-error "declared" "" { target *-*-* } 44 } +// { dg-error "declared" "" { target *-*-* } 45 } +// { dg-error "declared" "" { target *-*-* } 46 } +// { dg-error "declared" "" { target *-*-* } 47 } +// { dg-error "declared" "" { target *-*-* } 48 } +// { dg-error "declared" "" { target *-*-* } 49 } +// { dg-error "declared" "" { target *-*-* } 50 } +// { dg-error "declared" "" { target *-*-* } 52 } +// { dg-error "declared" "" { target *-*-* } 53 } +// { dg-error "declared" "" { target *-*-* } 54 } +// { dg-error "declared" "" { target *-*-* } 55 } +// { dg-error "declared" "" { target *-*-* } 56 } +// { dg-error "declared" "" { target *-*-* } 57 } +// { dg-error "declared" "" { target *-*-* } 58 } +// { dg-error "declared" "" { target *-*-* } 59 } +// { dg-error "declared" "" { target *-*-* } 60 } +// { dg-error "declared" "" { target *-*-* } 61 } +// { dg-error "declared" "" { target *-*-* } 62 } +// { dg-error "declared" "" { target *-*-* } 63 } +// { dg-error "declared" "" { target *-*-* } 64 } +// { dg-error "declared" "" { target *-*-* } 65 } +// { dg-error "declared" "" { target *-*-* } 66 } +// { dg-error "declared" "" { target *-*-* } 67 } +// { dg-error "declared" "" { target *-*-* } 68 } +// { dg-error "declared" "" { target *-*-* } 69 } +// { dg-error "declared" "" { target *-*-* } 70 } +// { dg-error "declared" "" { target *-*-* } 71 } +// { dg-error "declared" "" { target *-*-* } 72 } +// { dg-error "declared" "" { target *-*-* } 73 } +// { dg-error "declared" "" { target *-*-* } 75 } |