Debian Codegraph @

gcc/testsuite/c-c++-common/gomp/declare-variant-any.c

raw
1 /* Check that errors are detected if other trait-properties are given with
2 kind(any). */
3
4 extern int f1 (int);
5 extern int f2 (int);
6 extern int f3 (int);
7 extern int f4 (int);
8 extern int f5 (int);
9 extern int f6 (int);
10
11 #pragma omp declare variant (f1) match (device={kind(any,gpu)}) /* { dg-error "no other trait-property may be specified" } */
12 #pragma omp declare variant (f2) match (device={kind(cpu,"any")}) /* { dg-error "no other trait-property may be specified" } */
13 #pragma omp declare variant (f3) match (device={kind("any"),arch(x86_64)}) /* { dg-error "no other trait-property may be specified" } */
14 #pragma omp declare variant (f4) match (device={arch(x86_64),kind(any)}) /* { dg-error "no other trait-property may be specified" } */
15 #pragma omp declare variant (f5) match (device={kind(any,"any")}) /* { dg-error "trait-property .any. specified more than once" } */
16 #pragma omp declare variant (f6) match (device={kind("any",any)}) /* { dg-error "trait-property .any. specified more than once" } */
17 int f (int);