Debian Codegraph @

gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C

raw
1 /* { dg-options "-fopenmp -O2" } */
2 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
3
4 /* Test that simd clones are not generated for "declare target"
5 functions that throw. */
6
7 #pragma omp declare target
8 __attribute__ ((__noinline__)) int addit (int a, int b)
9 {
10 if (a < 0) throw -1;
11 return a + b;
12 }
13 #pragma omp end declare target
14
15 void callit (int *a, int *b, int *c)
16 {
17 int i;
18 #pragma omp for simd
19 for (i = 0; i < 16; i++)
20 c[i] = addit (a[i], b[i]);
21 }
22
23 /* { dg-final { scan-ipa-dump-not "Generated .* clone" "simdclone" { target x86_64-*-* } } } */