Commit 432b6d95 by Jonathan Wakely Committed by Jonathan Wakely

Make test helper work with non-copyable types

	* testsuite/util/testsuite_common_types.h
	(bitwise_assignment_operators): Use direct-initialization for C++11
	and later, to avoid CopyConstructible requirement.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Adjust expected errors and line numbers.

From-SVN: r241047
parent d6aa94b0
2016-10-12 Jonathan Wakely <jwakely@redhat.com> 2016-10-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/util/testsuite_common_types.h
(bitwise_assignment_operators): Use direct-initialization for C++11
and later, to avoid CopyConstructible requirement.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
line numbers.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
Adjust expected errors and line numbers.
* include/std/mutex [_GLIBCXX_HAVE_TLS] (_Once_call): Remove. * include/std/mutex [_GLIBCXX_HAVE_TLS] (_Once_call): Remove.
(call_once) [_GLIBCXX_HAVE_TLS]: Simplify by removing _Once_call. (call_once) [_GLIBCXX_HAVE_TLS]: Simplify by removing _Once_call.
......
...@@ -27,5 +27,5 @@ int main() ...@@ -27,5 +27,5 @@ int main()
return 0; return 0;
} }
// { dg-error "deleted" "" { target *-*-* } 615 } // { dg-error "deleted" "" { target *-*-* } 620 }
// { dg-prune-output "include" } // { dg-prune-output "include" }
...@@ -27,5 +27,5 @@ int main() ...@@ -27,5 +27,5 @@ int main()
return 0; return 0;
} }
// { dg-error "deleted" "" { target *-*-* } 654 } // { dg-error "deleted" "" { target *-*-* } 659 }
// { dg-prune-output "include" } // { dg-prune-output "include" }
...@@ -28,5 +28,5 @@ int main() ...@@ -28,5 +28,5 @@ int main()
return 0; return 0;
} }
// { dg-error "deleted" "" { target *-*-* } 615 } // { dg-error "deleted" "" { target *-*-* } 620 }
// { dg-prune-output "include" } // { dg-prune-output "include" }
...@@ -28,5 +28,5 @@ int main() ...@@ -28,5 +28,5 @@ int main()
return 0; return 0;
} }
// { dg-error "deleted" "" { target *-*-* } 654 } // { dg-error "deleted" "" { target *-*-* } 659 }
// { dg-prune-output "include" } // { dg-prune-output "include" }
...@@ -26,10 +26,8 @@ int main() ...@@ -26,10 +26,8 @@ int main()
return 0; return 0;
} }
// { dg-error "deleted" "" { target *-*-* } 469 } // { dg-error "operator" "" { target *-*-* } 476 }
// { dg-error "deleted" "" { target *-*-* } 470 } // { dg-error "operator" "" { target *-*-* } 477 }
// { dg-error "operator" "" { target *-*-* } 471 } // { dg-error "operator" "" { target *-*-* } 478 }
// { dg-error "operator" "" { target *-*-* } 472 }
// { dg-error "operator" "" { target *-*-* } 473 }
// { dg-prune-output "declared here" } // { dg-prune-output "declared here" }
...@@ -466,8 +466,13 @@ namespace __gnu_test ...@@ -466,8 +466,13 @@ namespace __gnu_test
void void
bitwise_assignment_operators() bitwise_assignment_operators()
{ {
#if __cplusplus >= 201103L
_Tp a{};
_Tp b{};
#else
_Tp a = _Tp(); _Tp a = _Tp();
_Tp b = _Tp(); _Tp b = _Tp();
#endif
a |= b; // set a |= b; // set
a &= ~b; // clear a &= ~b; // clear
a ^= b; a ^= b;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment