summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/pr35738.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/pr35738.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr35738.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr35738.c b/gcc/testsuite/gcc.dg/gomp/pr35738.c
new file mode 100644
index 000000000..0b3866eae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr35738.c
@@ -0,0 +1,18 @@
+/* PR c/35738 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void foo (void);
+
+void
+bar (void *p)
+{
+ int i = 0;
+ char q[10];
+#pragma omp atomic
+ i += q; /* { dg-warning "makes integer from pointer without a cast" } */
+#pragma omp atomic
+ i += foo; /* { dg-warning "makes integer from pointer without a cast" } */
+#pragma omp atomic
+ i += p; /* { dg-warning "makes integer from pointer without a cast" } */
+}