| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-fdump-tree-original -fdump-tree-gimple" } */ |
| 3 |
|
| 4 |
/* Check that the right call to f is wrapped in a GOMP_DISPATCH internal function |
| 5 |
before translation and that it is stripped during gimplification. */ |
| 6 |
|
| 7 |
int f(int); |
| 8 |
void g(int *x) |
| 9 |
{ |
| 10 |
#pragma omp dispatch |
| 11 |
x[f(1)] = f(f(2)); |
| 12 |
// ^ only this call to f is a dispatch call |
| 13 |
} |
| 14 |
|
| 15 |
/* { dg-final { scan-tree-dump "\.GOMP_DISPATCH \\(f \\(f \\(2\\)\\)\\)" "original" } } */ |
| 16 |
/* { dg-final { scan-tree-dump-times "\.GOMP_DISPATCH" 1 "original" } } */ |
| 17 |
/* { dg-final { scan-tree-dump-not "\.GOMP_DISPATCH" "gimple" } } */ |