summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr96545.c
blob: bc6b0cf345ca265ee18e8a7d6adb3a5131d08ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* PR c/96545 */
/* { dg-do compile } */

extern char x[], y[], z[];
struct S;
extern struct S s, t, u;
int v, w;

void
foo (void)
{
  __atomic_exchange (&x, &y, &z, 0);	/* { dg-error "must be a pointer to a complete type" } */
}

void
bar (void)
{
  __atomic_exchange (&s, &t, &u, 0);	/* { dg-error "must be a pointer to a complete type" } */
}

void
baz (void)
{
  __atomic_exchange (&v, &t, &w, 0);	/* { dg-error "size mismatch in argument 2 of" } */
}

void
qux (void)
{
  __atomic_exchange (&v, &w, &t, 0);	/* { dg-error "size mismatch in argument 3 of" } */
}