1 /* PR c/90628 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4
5 _Atomic int a = 1, b = 2, c = 3;
6 _Atomic long d = 4, e = 5, f = 6;
7 _Atomic long long g = 7, h = 8, i = 9;
8
9 void
10 f1 ()
11 {
12 __builtin_add_overflow (a, b, &c); /* { dg-error "argument 3 in call to function '__builtin_add_overflow' has pointer to '_Atomic' type" } */
13 }
14
15 void
16 f2 ()
17 {
18 __builtin_sub_overflow (d, e, &f); /* { dg-error "argument 3 in call to function '__builtin_sub_overflow' has pointer to '_Atomic' type" } */
19 }
20
21 void
22 f3 ()
23 {
24 __builtin_mul_overflow (g, h, &i); /* { dg-error "argument 3 in call to function '__builtin_mul_overflow' has pointer to '_Atomic' type" } */
25 }
26
27 void
28 f4 ()
29 {
30 __builtin_sadd_overflow (a, b, &c); /* { dg-warning "passing argument 3 of '__builtin_sadd_overflow' from incompatible pointer type" } */
31 }
32
33 void
34 f5 ()
35 {
36 __builtin_ssubl_overflow (d, e, &f); /* { dg-warning "passing argument 3 of '__builtin_ssubl_overflow' from incompatible pointer type" } */
37 }
38
39 void
40 f6 ()
41 {
42 __builtin_smulll_overflow (g, h, &i); /* { dg-warning "passing argument 3 of '__builtin_smulll_overflow' from incompatible pointer type" } */
43 }