1 |
689 |
jeremybenn |
/* { dg-do compile } */
|
2 |
|
|
/* { dg-options -Wtraditional-conversion } */
|
3 |
|
|
|
4 |
|
|
int
|
5 |
|
|
test_s (signed int x)
|
6 |
|
|
{
|
7 |
|
|
return __builtin_abs (x) /* { dg-bogus "as unsigned due to prototype" } */
|
8 |
|
|
+ __builtin_clz (x) /* { dg-warning "as unsigned due to prototype" } */
|
9 |
|
|
+ __builtin_ctz (x) /* { dg-warning "as unsigned due to prototype" } */
|
10 |
|
|
+ __builtin_clrsb (x) /* { dg-bogus "as unsigned due to prototype" } */
|
11 |
|
|
+ __builtin_ffs (x) /* { dg-bogus "as unsigned due to prototype" } */
|
12 |
|
|
+ __builtin_parity (x) /* { dg-warning "as unsigned due to prototype" } */
|
13 |
|
|
+ __builtin_popcount (x); /* { dg-warning "as unsigned due to prototype" } */
|
14 |
|
|
}
|
15 |
|
|
|
16 |
|
|
int
|
17 |
|
|
test_u (unsigned int x)
|
18 |
|
|
{
|
19 |
|
|
return __builtin_abs (x) /* { dg-warning "as signed due to prototype" } */
|
20 |
|
|
+ __builtin_clz (x) /* { dg-bogus "as signed due to prototype" } */
|
21 |
|
|
+ __builtin_ctz (x) /* { dg-bogus "as signed due to prototype" } */
|
22 |
|
|
+ __builtin_clrsb (x) /* { dg-warning "as signed due to prototype" } */
|
23 |
|
|
+ __builtin_ffs (x) /* { dg-warning "as signed due to prototype" } */
|
24 |
|
|
+ __builtin_parity (x) /* { dg-bogus "as signed due to prototype" } */
|
25 |
|
|
+ __builtin_popcount (x); /* { dg-bogus "as signed due to prototype" } */
|
26 |
|
|
}
|
27 |
|
|
|
28 |
|
|
int
|
29 |
|
|
test_sl (signed long x)
|
30 |
|
|
{
|
31 |
|
|
return __builtin_labs (x) /* { dg-bogus "as unsigned due to prototype" } */
|
32 |
|
|
+ __builtin_clzl (x) /* { dg-warning "as unsigned due to prototype" } */
|
33 |
|
|
+ __builtin_ctzl (x) /* { dg-warning "as unsigned due to prototype" } */
|
34 |
|
|
+ __builtin_clrsbl (x) /* { dg-bogus "as unsigned due to prototype" } */
|
35 |
|
|
+ __builtin_ffsl (x) /* { dg-bogus "as unsigned due to prototype" } */
|
36 |
|
|
+ __builtin_parityl (x) /* { dg-warning "as unsigned due to prototype" } */
|
37 |
|
|
+ __builtin_popcountl (x); /* { dg-warning "as unsigned due to prototype" } */
|
38 |
|
|
}
|
39 |
|
|
|
40 |
|
|
int
|
41 |
|
|
test_ul (unsigned long x)
|
42 |
|
|
{
|
43 |
|
|
return __builtin_labs (x) /* { dg-warning "as signed due to prototype" } */
|
44 |
|
|
+ __builtin_clzl (x) /* { dg-bogus "as signed due to prototype" } */
|
45 |
|
|
+ __builtin_ctzl (x) /* { dg-bogus "as signed due to prototype" } */
|
46 |
|
|
+ __builtin_clrsbl (x) /* { dg-warning "as signed due to prototype" } */
|
47 |
|
|
+ __builtin_ffsl (x) /* { dg-warning "as signed due to prototype" } */
|
48 |
|
|
+ __builtin_parityl (x) /* { dg-bogus "as signed due to prototype" } */
|
49 |
|
|
+ __builtin_popcountl (x); /* { dg-bogus "as signed due to prototype" } */
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
int
|
53 |
|
|
test_sll (signed long long x)
|
54 |
|
|
{
|
55 |
|
|
return __builtin_llabs (x) /* { dg-bogus "as unsigned due to prototype" } */
|
56 |
|
|
+ __builtin_clzll (x) /* { dg-warning "as unsigned due to prototype" } */
|
57 |
|
|
+ __builtin_ctzll (x) /* { dg-warning "as unsigned due to prototype" } */
|
58 |
|
|
+ __builtin_clrsbll (x) /* { dg-bogus "as unsigned due to prototype" } */
|
59 |
|
|
+ __builtin_ffsll (x) /* { dg-bogus "as unsigned due to prototype" } */
|
60 |
|
|
+ __builtin_parityll (x) /* { dg-warning "as unsigned due to prototype" } */
|
61 |
|
|
+ __builtin_popcountll (x); /* { dg-warning "as unsigned due to prototype" } */
|
62 |
|
|
}
|
63 |
|
|
|
64 |
|
|
int
|
65 |
|
|
test_ull (unsigned long long x)
|
66 |
|
|
{
|
67 |
|
|
return __builtin_llabs (x) /* { dg-warning "as signed due to prototype" } */
|
68 |
|
|
+ __builtin_clzll (x) /* { dg-bogus "as signed due to prototype" } */
|
69 |
|
|
+ __builtin_ctzll (x) /* { dg-bogus "as signed due to prototype" } */
|
70 |
|
|
+ __builtin_clrsbll (x) /* { dg-warning "as signed due to prototype" } */
|
71 |
|
|
+ __builtin_ffsll (x) /* { dg-warning "as signed due to prototype" } */
|
72 |
|
|
+ __builtin_parityll (x) /* { dg-bogus "as signed due to prototype" } */
|
73 |
|
|
+ __builtin_popcountll (x); /* { dg-bogus "as signed due to prototype" } */
|
74 |
|
|
}
|