| 1 |
struct incomplete_t; |
| 2 |
/* { dg-note "forward declaration of 'struct incomplete_t'" "" { target c++ } .-1 } */ |
| 3 |
|
| 4 |
/* Note: This note is only printed with C++ (trice); the loc is available due to TYPE_MAIN_DECL. */ |
| 5 |
|
| 6 |
struct incomplete_t *ptr; |
| 7 |
int i; |
| 8 |
|
| 9 |
void |
| 10 |
foo (void) |
| 11 |
{ |
| 12 |
#pragma omp target enter data map(to: i) map(to: ptr[0]) |
| 13 |
/* All apply to the line above. The first error is printed twice. */ |
| 14 |
/* { dg-error "invalid use of undefined type 'struct incomplete_t'" "" { target c } .-2 } */ |
| 15 |
/* { dg-error "invalid use of incomplete type 'struct incomplete_t'" "" { target c++ } .-3 } */ |
| 16 |
/* { dg-error "array section does not have mappable type in 'map' clause" "" { target *-*-* } .-4 } */ |
| 17 |
} |