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