1 /* PR c/96545 */
2 /* { dg-do compile } */
3
4 extern char x[], y[], z[];
5 struct S;
6 extern struct S s, t, u;
7 int v, w;
8
9 void
10 foo (void)
11 {
12 __atomic_exchange (&x, &y, &z, 0); /* { dg-error "must be a pointer to a complete type" } */
13 }
14
15 void
16 bar (void)
17 {
18 __atomic_exchange (&s, &t, &u, 0); /* { dg-error "must be a pointer to a complete type" } */
19 }
20
21 void
22 baz (void)
23 {
24 __atomic_exchange (&v, &t, &w, 0); /* { dg-error "size mismatch in argument 2 of" } */
25 }
26
27 void
28 qux (void)
29 {
30 __atomic_exchange (&v, &w, &t, 0); /* { dg-error "size mismatch in argument 3 of" } */
31 }