PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr71514.c
blob8bfa8051d0270afdb43b5e7b33ea71d1fec4ad73
1 /* PR c/71514 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 void
6 foo ()
10 int a, b;
12 void
13 fn1 (void)
15 __atomic_exchange (&a, &foo, &b, __ATOMIC_RELAXED); /* { dg-error "must not be a pointer to a function" } */
18 void
19 fn2 (int n)
21 int arr[n];
22 __atomic_exchange (&a, &arr, &b, __ATOMIC_RELAXED); /* { dg-error "must be a pointer to a constant size type" } */