diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c new file mode 100644 index 0000000..01d7425 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c @@ -0,0 +1,21 @@ +/* Check that GOMP_task doesn't produce callback edges when cpyfn is not + NULL. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */ +/* { dg-require-effective-target fopenmp } */ +/* { dg-require-effective-target lto } */ + +void test(int *a) { + for (int i = 0; i < 100; i++) { + a[i] = i; + } +} +int main() { + int a[100]; + __builtin_memset (a, 0, sizeof (a)); + #pragma omp task + test (a); +} + +/* { dg-final { scan-ipa-dump-not "Created callback edge" "cp" } } */ |