LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / pr15785-1.c
blob47cd3d7b01bc90f74169f5d5a1d201b3508f5882
1 /* { dg-do link } */
3 extern void link_error ();
5 void a (int x) {
6 if (~ (~x) - x)
7 link_error ();
9 void b (int x) {
10 if (- (-x) - x)
11 link_error ();
14 void c (int x) {
15 if (!(- (~x) - x))
16 link_error ();
19 void d (int x) {
20 if (!(~ (-x) - x))
21 link_error ();
24 void e (int x) {
25 if (x + ~(x - 1))
26 link_error ();
29 void f (int x) {
30 if (x + ~(x + (-1)))
31 link_error ();
34 int main (int argc, char *argv[]) {
35 a(argc);
36 b(argc);
37 c(argc);
38 d(argc);
39 e(argc);
40 f(argc);
41 return 0;