| 1 |
/* { dg-additional-options "-fdump-tree-gimple" } */ |
| 2 |
int bar (int); |
| 3 |
int bar2 (int); |
| 4 |
|
| 5 |
void foobar() |
| 6 |
{ |
| 7 |
int d[64], e[64], f[64]; |
| 8 |
#pragma omp parallel default(none) /* { dg-note "enclosing 'parallel'" } */ |
| 9 |
#pragma omp task affinity (d, e[bar(5)], f[4:10]) |
| 10 |
; |
| 11 |
/* { dg-error "'f' not specified in enclosing 'parallel'" "" { target *-*-* } .-2 } */ |
| 12 |
/* { dg-error "'e' not specified in enclosing 'parallel'" "" { target *-*-* } .-3 } */ |
| 13 |
/* { dg-error "'d' not specified in enclosing 'parallel'" "" { target *-*-* } .-4 } */ |
| 14 |
} |
| 15 |
|
| 16 |
void |
| 17 |
foo (void) |
| 18 |
{ |
| 19 |
int a[64]; |
| 20 |
#pragma omp parallel default(none) /* { dg-note "enclosing 'parallel'" } */ |
| 21 |
#pragma omp task affinity (iterator (j=bar(0):bar(1):bar(2)) : a[bar(j)]) |
| 22 |
; |
| 23 |
/* { dg-error "'a' not specified in enclosing 'parallel'" "" { target *-*-* } .-2 } */ |
| 24 |
} |
| 25 |
|
| 26 |
void |
| 27 |
qux (void) |
| 28 |
{ |
| 29 |
int a[64], b[64], c[64]; |
| 30 |
#pragma omp parallel default(none) /* { dg-note "enclosing 'parallel'" } */ |
| 31 |
#pragma omp task affinity (iterator (j=bar(0):bar(1):bar(2)) : a[bar(j+1)], b[bar(j+2)], c[bar(j+3)]) |
| 32 |
; |
| 33 |
/* { dg-error "'a' not specified in enclosing 'parallel'" "" { target *-*-* } .-2 } */ |
| 34 |
/* { dg-error "'c' not specified in enclosing 'parallel'" "" { target *-*-* } .-3 } */ |
| 35 |
/* { dg-error "'b' not specified in enclosing 'parallel'" "" { target *-*-* } .-4 } */ |
| 36 |
} |