1 // { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
2 // { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
3 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
4 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
5 // { dg-require-cstdint "" }
6 // { dg-require-gthreads "" }
7 // { dg-require-atomic-builtins "" }
9 // Copyright (C) 2011-2013 Free Software Foundation, Inc.
11 // This file is part of the GNU ISO C++ Library. This library is free
12 // software; you can redistribute it and/or modify it under the
13 // terms of the GNU General Public License as published by the
14 // Free Software Foundation; either version 3, or (at your option)
17 // This library is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
22 // You should have received a copy of the GNU General Public License along
23 // with this library; see the file COPYING3. If not see
24 // <http://www.gnu.org/licenses/>.
28 #include <testsuite_hooks.h>
32 bool test
__attribute__((unused
)) = true;
37 const launch both
= launch::async
|launch::deferred
;
38 const launch all
= ~none
;
40 VERIFY( (none
& both
) == none
);
41 VERIFY( (none
| both
) == both
);
42 VERIFY( (none
^ both
) == both
);
44 VERIFY( (none
& all
) == none
);
45 VERIFY( (none
| all
) == all
);
46 VERIFY( (none
^ all
) == all
);
48 VERIFY( (both
& all
) == both
);
49 VERIFY( (both
| all
) == all
);
50 VERIFY( (both
^ all
) == ~both
);
52 VERIFY( (none
& launch::async
) == none
);
53 VERIFY( (none
& launch::deferred
) == none
);
55 VERIFY( (none
| launch::async
) == launch::async
);
56 VERIFY( (none
| launch::deferred
) == launch::deferred
);
58 VERIFY( (none
^ launch::async
) == launch::async
);
59 VERIFY( (none
^ launch::deferred
) == launch::deferred
);
61 VERIFY( (none
& none
) == none
);
62 VERIFY( (none
| none
) == none
);
63 VERIFY( (none
^ none
) == none
);
65 VERIFY( (both
& both
) == both
);
66 VERIFY( (both
| both
) == both
);
67 VERIFY( (both
^ both
) == none
);
69 VERIFY( (all
& all
) == all
);
70 VERIFY( (all
| all
) == all
);
71 VERIFY( (all
^ all
) == none
);