| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-foffload=disable" } */ |
| 3 |
/* { dg-additional-options "-mavx512bw -mavx512vl" { target { i?86-*-* x86_64-*-* } } } */ |
| 4 |
|
| 5 |
/* References to function parameters in dynamic selector expressions for |
| 6 |
"declare variant" isn't supported yet; see PR 113904. Check to see that |
| 7 |
a proper error is diagnosed meanwhile and GCC doesn't just wander off |
| 8 |
into the weeds and ICE. */ |
| 9 |
|
| 10 |
extern int frob (int); |
| 11 |
|
| 12 |
void f01 (int, int); |
| 13 |
void f02 (int, int); |
| 14 |
void f03 (int, int); |
| 15 |
#pragma omp declare variant (f01) match (target_device={device_num (devnum), isa("avx512f","avx512vl")}) /* { dg-message "sorry, unimplemented: reference to function parameter" } */ |
| 16 |
#pragma omp declare variant (f02) match (implementation={vendor(score(15):gnu)}) |
| 17 |
#pragma omp declare variant (f03) match (user={condition(score(11):frob (ok + 42))}) /* { dg-message "sorry, unimplemented: reference to function parameter" } */ |
| 18 |
void f04 (int devnum, int ok); |
| 19 |
|
| 20 |
void |
| 21 |
test1 (void) |
| 22 |
{ |
| 23 |
int i; |
| 24 |
#pragma omp parallel for |
| 25 |
for (i = 0; i < 1; i++) |
| 26 |
f04 (17, 1); |
| 27 |
} |
| 28 |
|
| 29 |
|