Debian Codegraph @

gcc/testsuite/gcc.dg/gomp/pr35738-2.c

raw
1 /* PR c/35738 */
2 /* { dg-do compile } */
3 /* { dg-options "-fopenmp" } */
4
5 void foo (void);
6
7 void
8 bar (void *p)
9 {
10 int i = 0;
11 char q[10];
12 #pragma omp atomic
13 i += q; /* { dg-error "makes integer from pointer without a cast" } */
14 #pragma omp atomic
15 i += foo; /* { dg-error "makes integer from pointer without a cast" } */
16 #pragma omp atomic
17 i += p; /* { dg-error "makes integer from pointer without a cast" } */
18 }