| 1 |
/* This file has a syntax error but should not ICE. |
| 2 |
Namely, a '}' is missing in one(). */ |
| 3 |
|
| 4 |
typedef enum omp_allocator_handle_t |
| 5 |
#if __cplusplus >= 201103L |
| 6 |
: __UINTPTR_TYPE__ |
| 7 |
#endif |
| 8 |
{ |
| 9 |
omp_default_mem_alloc = 1, |
| 10 |
omp_low_lat_mem_alloc = 5, |
| 11 |
__omp_allocator_handle_t_max__ = __UINTPTR_MAX__ |
| 12 |
} omp_allocator_handle_t; |
| 13 |
|
| 14 |
#include <stdint.h> |
| 15 |
|
| 16 |
void |
| 17 |
one () |
| 18 |
{ /* { dg-note "to match this '\{'" "" { target c++ } } */ |
| 19 |
int result = 0, n = 3; |
| 20 |
#pragma omp target map(tofrom: result) firstprivate(n) |
| 21 |
{ |
| 22 |
int var = 5; //, var2[n]; |
| 23 |
#pragma omp allocate(var) align(128) allocator(omp_low_lat_mem_alloc) /* { dg-message "sorry, unimplemented: '#pragma omp allocate' not yet supported" "" { target c++ } } */ |
| 24 |
var = 7; |
| 25 |
} |
| 26 |
|
| 27 |
void |
| 28 |
two () |
| 29 |
{ /* { dg-error "a function-definition is not allowed here before '\{' token" "" { target c++ } } */ |
| 30 |
int scalar = 44; |
| 31 |
#pragma omp allocate(scalar) |
| 32 |
|
| 33 |
#pragma omp parallel firstprivate(scalar) |
| 34 |
scalar = 33; |
| 35 |
} |
| 36 |
/* { dg-error "expected declaration or statement at end of input" "" { target c } .-1 } */ |
| 37 |
/* { dg-error "expected '\}' at end of input" "" { target c++ } .-2 } */ |