URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/gnu-stable/gcc-4.5.1/libstdc++-v3/testsuite/29_atomics
- from Rev 816 to Rev 826
- ↔ Reverse comparison
Rev 816 → Rev 826
/atomic_address/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_address test_type; |
test_type t1; |
test_type t2; |
t1 = t2; |
} |
// { dg-error "used here" "" { target *-*-* } 29 } |
// { dg-excess-errors "deleted function" } |
/atomic_address/cons/single_value.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> |
|
int main() |
{ |
// Single value constructor. |
void* v = NULL; |
std::atomic_address a(v); |
return 0; |
} |
/atomic_address/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_address test_type; |
test_type t1; |
test_type t2(t1); |
} |
// { dg-error "used here" "" { target *-*-* } 28 } |
// { dg-excess-errors "deleted function" } |
/atomic_address/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_address a; |
return 0; |
} |
/atomic_address/cons/aggregate.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/>. |
|
#include <atomic> |
|
int main() |
{ |
std::atomic_address a = { { NULL } }; |
return 0; |
} |
/atomic_address/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_address>(); |
} |
/atomic_address/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_address>(); |
} |
/atomic_integral/cons/assign_neg.cc
0,0 → 1,40
// { 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> |
|
int main() |
{ |
__gnu_test::assignable test; |
__gnu_cxx::typelist::apply_generator(test, |
__gnu_test::atomic_integrals::type()); |
return 0; |
} |
|
// { dg-error "used here" "" { target *-*-* } 521 } |
// { dg-excess-errors "deleted function" } |
// { dg-excess-errors "deleted function" } |
// { dg-error "instantiated from" "" { target *-*-* } 28 } |
// { dg-error "instantiated from" "" { target *-*-* } 528 } |
// { dg-error "instantiated from" "" { target *-*-* } 170 } |
// { dg-error "instantiated from" "" { target *-*-* } 399 } |
// { dg-error "instantiated from" "" { target *-*-* } 168 } |
// { dg-excess-errors "In member function" } |
/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; |
} |
/atomic_integral/cons/copy_neg.cc
0,0 → 1,40
// { 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> |
|
int main() |
{ |
__gnu_test::copy_constructible test; |
__gnu_cxx::typelist::apply_generator(test, |
__gnu_test::atomic_integrals::type()); |
return 0; |
} |
|
// { dg-error "used here" "" { target *-*-* } 560 } |
// { dg-excess-errors "deleted function" } |
// { dg-excess-errors "deleted function" } |
// { dg-error "instantiated from" "" { target *-*-* } 28 } |
// { dg-error "instantiated from" "" { target *-*-* } 566 } |
// { dg-error "instantiated from" "" { target *-*-* } 170 } |
// { dg-error "instantiated from" "" { target *-*-* } 399 } |
// { dg-error "instantiated from" "" { target *-*-* } 168 } |
// { dg-excess-errors "In member function" } |
/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; |
} |
/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; |
} |
/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; |
} |
/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()); |
} |
/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()); |
} |
/atomic_integral/operators/increment_neg.cc
0,0 → 1,34
// { 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; |
test.operator()<std::atomic_bool>(); |
return 0; |
} |
|
// { dg-error "operator" "" { target *-*-* } 353 } |
// { dg-error "operator" "" { target *-*-* } 354 } |
// { dg-error "operator" "" { target *-*-* } 355 } |
// { dg-excess-errors "In file included from" } |
/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; |
} |
/atomic_integral/operators/bitwise_neg.cc
0,0 → 1,33
// { 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::bitwise_assignment_operators<std::atomic_bool>(); |
return 0; |
} |
|
// { dg-error "operator" "" { target *-*-* } 404 } |
// { dg-error "operator" "" { target *-*-* } 405 } |
// { dg-error "operator" "" { target *-*-* } 406 } |
// { dg-excess-errors "In file included from" } |
/atomic_integral/operators/decrement_neg.cc
0,0 → 1,34
// { 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; |
test.operator()<std::atomic_bool>(); |
return 0; |
} |
|
// { dg-error "operator" "" { target *-*-* } 375 } |
// { dg-error "operator" "" { target *-*-* } 376 } |
// { dg-error "operator" "" { target *-*-* } 377 } |
// { dg-excess-errors "In file included from" } |
/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()); |
}; |
/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()); |
}; |
/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()); |
}; |
/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; |
} |
/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 "used here" "" { target *-*-* } 29 } |
// { dg-excess-errors "deleted function" } |
/atomic_flag/cons/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/>. |
|
#include <stdatomic.h> |
|
void test01() |
{ |
using namespace std; |
atomic_flag af = ATOMIC_FLAG_INIT; |
} |
/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 "used here" "" { target *-*-* } 28 } |
// { dg-excess-errors "deleted function" } |
/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; |
} |
/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; |
} |
/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>(); |
} |
/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>(); |
} |
/atomic_flag/clear/1.c
0,0 → 1,34
// { dg-options "-x c -shared-libgcc -lstdc++" } |
|
// 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 <cassert> |
#include <stdatomic.h> |
|
// libstdc++/40826 |
// libstdc++/40654 |
int main() |
{ |
atomic_flag f = ATOMIC_FLAG_INIT; |
|
atomic_flag_clear(&f); // set to false |
assert( false == atomic_flag_test_and_set(&f) ); // return previous false, set to true |
assert( true == atomic_flag_test_and_set(&f) ); // return true |
|
return 0; |
} |
atomic_flag/clear/1.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: atomic_flag/clear/1.cc
===================================================================
--- atomic_flag/clear/1.cc (nonexistent)
+++ atomic_flag/clear/1.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+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;
+}
Index: atomic_flag/test_and_set/explicit.c
===================================================================
--- atomic_flag/test_and_set/explicit.c (nonexistent)
+++ atomic_flag/test_and_set/explicit.c (revision 826)
@@ -0,0 +1,30 @@
+// { dg-options "-x c -shared-libgcc -lstdc++" }
+
+// 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
+// .
+
+#include
+
+int main()
+{
+ atomic_flag af = ATOMIC_FLAG_INIT;
+
+ if (!atomic_flag_test_and_set_explicit(&af, memory_order_acquire))
+ atomic_flag_clear_explicit(&af, memory_order_release);
+
+ return 0;
+}
atomic_flag/test_and_set/explicit.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: atomic_flag/test_and_set/explicit.cc
===================================================================
--- atomic_flag/test_and_set/explicit.cc (nonexistent)
+++ atomic_flag/test_and_set/explicit.cc (revision 826)
@@ -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
+// .
+
+#include
+
+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;
+}
Index: atomic_flag/test_and_set/implicit.c
===================================================================
--- atomic_flag/test_and_set/implicit.c (nonexistent)
+++ atomic_flag/test_and_set/implicit.c (revision 826)
@@ -0,0 +1,30 @@
+// { dg-options "-x c -shared-libgcc -lstdc++" }
+
+// 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
+// .
+
+#include
+
+int main()
+{
+ atomic_flag af = ATOMIC_FLAG_INIT;
+
+ if (!atomic_flag_test_and_set(&af))
+ atomic_flag_clear(&af);
+
+ return 0;
+}
atomic_flag/test_and_set/implicit.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: atomic_flag/test_and_set/implicit.cc
===================================================================
--- atomic_flag/test_and_set/implicit.cc (nonexistent)
+++ atomic_flag/test_and_set/implicit.cc (revision 826)
@@ -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
+// .
+
+#include
+
+int main()
+{
+ using namespace std;
+ atomic_flag af = ATOMIC_FLAG_INIT;
+
+ if (!af.test_and_set())
+ af.clear();
+
+ return 0;
+}
Index: headers/atomic/types_std_c++0x.cc
===================================================================
--- headers/atomic/types_std_c++0x.cc (nonexistent)
+++ headers/atomic/types_std_c++0x.cc (revision 826)
@@ -0,0 +1,78 @@
+// { 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
+// .
+
+#include
+
+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_ssize_t;
+ using std::atomic_ptrdiff_t;
+ using std::atomic_intmax_t;
+ using std::atomic_uintmax_t;
+
+ using std::atomic_address;
+}
Index: headers/atomic/functions_std_c++0x.cc
===================================================================
--- headers/atomic/functions_std_c++0x.cc (nonexistent)
+++ headers/atomic/functions_std_c++0x.cc (revision 826)
@@ -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
+// .
+
+#include
+
+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;
+}
Index: headers/atomic/std_c++0x_neg.cc
===================================================================
--- headers/atomic/std_c++0x_neg.cc (nonexistent)
+++ headers/atomic/std_c++0x_neg.cc (revision 826)
@@ -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
+// .
+
+#include // { dg-excess-errors "In file included from" }
+
+// { dg-error "upcoming ISO" "" { target *-*-* } 31 }
+
+
+
Index: headers/atomic/macros.cc
===================================================================
--- headers/atomic/macros.cc (nonexistent)
+++ headers/atomic/macros.cc (revision 826)
@@ -0,0 +1,45 @@
+// { 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
+// .
+
+#include
+
+namespace gnu
+{
+#ifndef ATOMIC_INTEGRAL_LOCK_FREE
+# error "ATOMIC_INTEGRAL_LOCK_FREE must be a macro"
+#else
+# if ATOMIC_INTEGRAL_LOCK_FREE != 0 \
+ && ATOMIC_INTEGRAL_LOCK_FREE != 1 && ATOMIC_INTEGRAL_LOCK_FREE != 2
+# error "ATOMIC_INTEGRAL_LOCK_FREE must be 0, 1, or 2"
+# endif
+#endif
+
+#ifndef ATOMIC_ADDRESS_LOCK_FREE
+# error "ATOMIC_ADDRESS_LOCK_FREE must be a macro"
+# if ATOMIC_INTEGRAL_LOCK_FREE != 0 \
+ && ATOMIC_INTEGRAL_LOCK_FREE != 1 && ATOMIC_INTEGRAL_LOCK_FREE != 2
+# error "ATOMIC_INTEGRAL_LOCK_FREE must be 0, 1, or 2"
+# endif
+#endif
+
+#ifndef ATOMIC_FLAG_INIT
+ #error "ATOMIC_FLAG_INIT_must_be_a_macro"
+#endif
+}
Index: headers/atomic/types_std_c++0x_neg.cc
===================================================================
--- headers/atomic/types_std_c++0x_neg.cc (nonexistent)
+++ headers/atomic/types_std_c++0x_neg.cc (revision 826)
@@ -0,0 +1,78 @@
+// { 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
+// .
+
+#include
+
+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_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 }
Index: headers/stdatomic.h/macros.c
===================================================================
--- headers/stdatomic.h/macros.c (nonexistent)
+++ headers/stdatomic.h/macros.c (revision 826)
@@ -0,0 +1,114 @@
+// { dg-options "-x c" }
+// { 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
+// .
+
+#include
+
+int main()
+{
+#ifndef ATOMIC_INTEGRAL_LOCK_FREE
+ #error "ATOMIC_INTEGRAL_LOCK_FREE_must_be_a_macro"
+#endif
+
+#ifndef ATOMIC_ADDRESS_LOCK_FREE
+ #error "ATOMIC_ADDRESS_LOCK_FREE_must_be_a_macro"
+#endif
+
+#ifndef ATOMIC_FLAG_INIT
+ #error "ATOMIC_FLAG_INIT_must_be_a_macro"
+#endif
+
+#ifndef atomic_is_lock_free
+ #error "atomic_is_lock_free_must_be_a_macro"
+#endif
+
+#ifndef atomic_load
+ #error "atomic_load_must_be_a_macro"
+#endif
+
+#ifndef atomic_load_explicit
+ #error "atomic_load_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_store_explicit
+ #error "atomic_store_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_store
+ #error "atomic_store_must_be_a_macro"
+#endif
+
+#ifndef atomic_exchange_explicit
+ #error "atomic_exchange_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_exchange
+ #error "atomic_exchange_must_be_a_macro"
+#endif
+
+#ifndef atomic_compare_exchange
+ #error "atomic_compare_exchange_must_be_a_macro"
+#endif
+
+#ifndef atomic_compare_exchange_explicit
+ #error "atomic_compare_exchange_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_add_explicit
+ #error "atomic_fetch_add_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_add
+ #error "atomic_fetch_add_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_sub_explicit
+ #error "atomic_fetch_sub_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_sub
+ #error "atomic_fetch_sub_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_and_explicit
+ #error "atomic_fetch_and_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_and
+ #error "atomic_fetch_and_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_or_explicit
+ #error "atomic_fetch_or_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_or
+ #error "atomic_fetch_or_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_xor_explicit
+ #error "atomic_fetch_xor_explicit_must_be_a_macro"
+#endif
+
+#ifndef atomic_fetch_xor
+ #error "atomic_fetch_xor_must_be_a_macro"
+#endif
+
+ return 0;
+}
headers/stdatomic.h/macros.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: headers/stdatomic.h/types.c
===================================================================
--- headers/stdatomic.h/types.c (nonexistent)
+++ headers/stdatomic.h/types.c (revision 826)
@@ -0,0 +1,77 @@
+// { dg-options "-x c" }
+// { 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
+// .
+
+#include
+
+void test01()
+{
+ typedef memory_order t_01;
+ memory_order t_02 __attribute__((unused)) = memory_order_relaxed;
+ memory_order t_03 __attribute__((unused)) = memory_order_acquire;
+ memory_order t_04 __attribute__((unused)) = memory_order_release;
+ memory_order t_05 __attribute__((unused)) = memory_order_acq_rel;
+ memory_order t_06 __attribute__((unused)) = memory_order_seq_cst;
+
+ typedef atomic_flag t_07;
+
+ // atomics for builtins types
+ typedef atomic_bool t_08;
+ typedef atomic_char t_09;
+ typedef atomic_schar t_10;
+ typedef atomic_uchar t_11;
+ typedef atomic_short t_12;
+ typedef atomic_ushort t_13;
+ typedef atomic_int t_14;
+ typedef atomic_uint t_15;
+ typedef atomic_long t_16;
+ typedef atomic_ulong t_17;
+ typedef atomic_llong t_18;
+ typedef atomic_ullong t_19;
+ typedef atomic_wchar_t t_20;
+ typedef atomic_char16_t t_21;
+ typedef atomic_char32_t t_22;
+
+ // atomics for standard typedefs
+ typedef atomic_int_least8_t t_23;
+ typedef atomic_uint_least8_t t_24;
+ typedef atomic_int_least16_t t_25;
+ typedef atomic_uint_least16_t t_26;
+ typedef atomic_int_least32_t t_27;
+ typedef atomic_uint_least32_t t_28;
+ typedef atomic_int_least64_t t_29;
+ typedef atomic_uint_least64_t t_30;
+ typedef atomic_int_fast8_t t_31;
+ typedef atomic_uint_fast8_t t_32;
+ typedef atomic_int_fast16_t t_33;
+ typedef atomic_uint_fast16_t t_34;
+ typedef atomic_int_fast32_t t_35;
+ typedef atomic_uint_fast32_t t_36;
+ typedef atomic_int_fast64_t t_37;
+ typedef atomic_uint_fast64_t t_38;
+ typedef atomic_intptr_t t_39;
+ typedef atomic_uintptr_t t_40;
+ typedef atomic_size_t t_41;
+ typedef atomic_ssize_t t_42;
+ typedef atomic_ptrdiff_t t_43;
+ typedef atomic_intmax_t t_44;
+ typedef atomic_uintmax_t t_45;
+
+ typedef atomic_address t_46;
+}
headers/stdatomic.h/types.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: headers/stdatomic.h/functions.c
===================================================================
--- headers/stdatomic.h/functions.c (nonexistent)
+++ headers/stdatomic.h/functions.c (revision 826)
@@ -0,0 +1,36 @@
+// { dg-options "-x c" }
+// { 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
+// .
+
+#include
+
+int main()
+{
+ atomic_flag f;
+ atomic_flag* p = &f;
+ memory_order m = memory_order_relaxed;
+
+ // For position only.
+ atomic_flag_test_and_set(p);
+ atomic_flag_test_and_set_explicit(p, m);
+ atomic_flag_clear(p);
+ atomic_flag_clear_explicit(p, m);
+
+ return 0;
+}
headers/stdatomic.h/functions.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: headers/stdatomic.h/debug_mode.c
===================================================================
--- headers/stdatomic.h/debug_mode.c (nonexistent)
+++ headers/stdatomic.h/debug_mode.c (revision 826)
@@ -0,0 +1,22 @@
+// { dg-options "-x c -D_GLIBCXX_DEBUG" }
+// { 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
+// .
+
+// libstdc++/36130
+#include
headers/stdatomic.h/debug_mode.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: atomic/cons/assign_neg.cc
===================================================================
--- atomic/cons/assign_neg.cc (nonexistent)
+++ atomic/cons/assign_neg.cc (revision 826)
@@ -0,0 +1,47 @@
+// { 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
+// .
+
+#include
+#include
+
+int main()
+{
+ __gnu_test::assignable test;
+ __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl());
+ return 0;
+}
+
+// { dg-error "used here" "" { target *-*-* } 521 }
+// { dg-error "deleted function" "" { target *-*-* } 230 }
+// { dg-error "deleted function" "" { target *-*-* } 248 }
+// { dg-error "deleted function" "" { target *-*-* } 266 }
+// { dg-error "deleted function" "" { target *-*-* } 284 }
+// { dg-error "deleted function" "" { target *-*-* } 302 }
+// { dg-error "deleted function" "" { target *-*-* } 320 }
+// { dg-error "deleted function" "" { target *-*-* } 338 }
+// { dg-error "deleted function" "" { target *-*-* } 356 }
+// { dg-error "deleted function" "" { target *-*-* } 374 }
+// { dg-error "deleted function" "" { target *-*-* } 392 }
+// { dg-error "deleted function" "" { target *-*-* } 410 }
+// { dg-error "deleted function" "" { target *-*-* } 428 }
+// { dg-error "deleted function" "" { target *-*-* } 446 }
+// { dg-error "deleted function" "" { target *-*-* } 464 }
+// { dg-error "deleted function" "" { target *-*-* } 482 }
+// { dg-excess-errors "In member function" }
Index: atomic/cons/single_value.cc
===================================================================
--- atomic/cons/single_value.cc (nonexistent)
+++ atomic/cons/single_value.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+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;
+}
Index: atomic/cons/user_pod.cc
===================================================================
--- atomic/cons/user_pod.cc (nonexistent)
+++ atomic/cons/user_pod.cc (revision 826)
@@ -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
+// .
+
+#include
+
+struct dwordp
+{
+ int* p1;
+ int* p2;
+};
+
+void atomics()
+{
+ std::atomic a;
+ bool b = a.is_lock_free(); // { dg-excess-errors "undefined reference to" }
+}
+
+int main()
+{
+ atomics();
+ return 0;
+}
Index: atomic/cons/copy_neg.cc
===================================================================
--- atomic/cons/copy_neg.cc (nonexistent)
+++ atomic/cons/copy_neg.cc (revision 826)
@@ -0,0 +1,47 @@
+// { 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
+// .
+
+#include
+#include
+
+int main()
+{
+ __gnu_test::copy_constructible test;
+ __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl());
+ return 0;
+}
+
+// { dg-error "used here" "" { target *-*-* } 560 }
+// { dg-error "deleted function" "" { target *-*-* } 229 }
+// { dg-error "deleted function" "" { target *-*-* } 247 }
+// { dg-error "deleted function" "" { target *-*-* } 265 }
+// { dg-error "deleted function" "" { target *-*-* } 283 }
+// { dg-error "deleted function" "" { target *-*-* } 301 }
+// { dg-error "deleted function" "" { target *-*-* } 319 }
+// { dg-error "deleted function" "" { target *-*-* } 337 }
+// { dg-error "deleted function" "" { target *-*-* } 355 }
+// { dg-error "deleted function" "" { target *-*-* } 373 }
+// { dg-error "deleted function" "" { target *-*-* } 391 }
+// { dg-error "deleted function" "" { target *-*-* } 409 }
+// { dg-error "deleted function" "" { target *-*-* } 427 }
+// { dg-error "deleted function" "" { target *-*-* } 445 }
+// { dg-error "deleted function" "" { target *-*-* } 463 }
+// { dg-error "deleted function" "" { target *-*-* } 481 }
+// { dg-excess-errors "In member function" }
Index: atomic/cons/default.cc
===================================================================
--- atomic/cons/default.cc (nonexistent)
+++ atomic/cons/default.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+int main()
+{
+ __gnu_test::default_constructible test;
+ __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl());
+ return 0;
+}
Index: atomic/cons/copy_list.cc
===================================================================
--- atomic/cons/copy_list.cc (nonexistent)
+++ atomic/cons/copy_list.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+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;
+}
Index: atomic/cons/direct_list.cc
===================================================================
--- atomic/cons/direct_list.cc (nonexistent)
+++ atomic/cons/direct_list.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+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;
+}
Index: atomic/requirements/explicit_instantiation/1.cc
===================================================================
--- atomic/requirements/explicit_instantiation/1.cc (nonexistent)
+++ atomic/requirements/explicit_instantiation/1.cc (revision 826)
@@ -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
+// .
+
+// This file tests explicit instantiation of basic_string
+
+#include
+#include
+
+template class std::atomic<__gnu_test::pod_char>;
+template class std::atomic<__gnu_test::pod_char*>;
Index: atomic/requirements/base_classes.cc
===================================================================
--- atomic/requirements/base_classes.cc (nonexistent)
+++ atomic/requirements/base_classes.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+
+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());
+}
Index: atomic/operators/integral_assignment.cc
===================================================================
--- atomic/operators/integral_assignment.cc (nonexistent)
+++ atomic/operators/integral_assignment.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+#include
+
+int main()
+{
+ __gnu_test::integral_assignable test;
+ __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
+ __gnu_test::integral_types::type());
+ return 0;
+}
Index: atomic/operators/integral_conversion.cc
===================================================================
--- atomic/operators/integral_conversion.cc (nonexistent)
+++ atomic/operators/integral_conversion.cc (revision 826)
@@ -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
+// .
+
+#include
+#include
+#include
+
+int main()
+{
+ __gnu_test::integral_convertable test;
+ __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
+ __gnu_test::integral_types::type());
+ return 0;
+}