aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/task-detach-3.c
blob: 97e622de2cd0e82c0a3a616c2137eee7277215da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR c++/100319 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */

typedef enum omp_event_handle_t
{
  __omp_event_handle_t_max__ = __UINTPTR_MAX__
} omp_event_handle_t;

extern void omp_fulfill_event (omp_event_handle_t);

void f (omp_event_handle_t x, omp_event_handle_t y, int z)
{
  #pragma omp task detach (x) firstprivate (y, z)	/* { dg-bogus "the event handle of a 'detach' clause should not be in a data-sharing clause" } */
    ;

  #pragma omp task detach (x) shared (y)		/* { dg-bogus "the event handle of a 'detach' clause should not be in a data-sharing clause" } */
    ;
}