| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-fopenmp" } |
| 3 |
|
| 4 |
typedef enum omp_event_handle_t |
| 5 |
{ |
| 6 |
__omp_event_handle_t_max__ = __UINTPTR_MAX__ |
| 7 |
} omp_event_handle_t; |
| 8 |
|
| 9 |
template <typename T> |
| 10 |
void foo () |
| 11 |
{ |
| 12 |
T t; |
| 13 |
#pragma omp task detach (t) |
| 14 |
; |
| 15 |
} |
| 16 |
|
| 17 |
template <typename T> |
| 18 |
void bar () |
| 19 |
{ |
| 20 |
T t; |
| 21 |
#pragma omp task detach (t) // { dg-error "'detach' clause event handle has type 'int' rather than 'omp_event_handle_t'" } |
| 22 |
; |
| 23 |
} |
| 24 |
|
| 25 |
void f() |
| 26 |
{ |
| 27 |
foo <omp_event_handle_t> (); |
| 28 |
bar <int> (); // { dg-message "required from here" } |
| 29 |
} |