1module main
2  implicit none
3contains
4  subroutine f1 ()
5  end subroutine
6  subroutine f28 ()
7    !$omp declare variant (f1) match(construct={parallel},construct={do})  ! { dg-error "selector set 'construct' specified more than once" }
8  end subroutine
9  subroutine f29 ()
10    !$omp declare variant (f1) match(construct={parallel},construct={parallel}) ! { dg-error "selector set 'construct' specified more than once" }
11  end subroutine
12  subroutine f30 ()
13    !$omp declare variant (f1) match(user={condition(0)},construct={target},user={condition(0)})  ! { dg-error "selector set 'user' specified more than once" }
14  end subroutine
15  subroutine f31 ()
16    !$omp declare variant (f1) match(user={condition(0)},user={condition(1)}) ! { dg-error "selector set 'user' specified more than once" }
17  end subroutine
18  subroutine f37 ()
19    !$omp declare variant (f1) match(device={kind(unknown)})  ! { dg-warning "unknown property 'unknown' of 'kind' selector" }
20  end subroutine
21  subroutine f38 ()
22    !$omp declare variant (f1) match(device={kind(unknown,foobar)})	! { dg-warning "unknown property 'unknown' of 'kind' selector" }
23									! { dg-warning "unknown property 'foobar' of 'kind' selector" "" { target *-*-* } 22 }
24  end subroutine
25  subroutine f42 ()
26    !$omp declare variant (f1) match(device={arch(x86_64)},device={isa(avx512vl)})  ! { dg-error "selector set 'device' specified more than once" }
27  end subroutine
28  subroutine f47 ()
29    !$omp declare variant (f1) match(implementation={vendor("foobar")}) ! { dg-warning "unknown property '.foobar.' of 'vendor' selector" }
30  end subroutine
31  subroutine f53 ()
32    !$omp declare variant (f1) match(implementation={atomic_default_mem_order(acquire)})  ! { dg-error "incorrect property 'acquire' of 'atomic_default_mem_order' selector" }
33  end subroutine
34  subroutine f54 ()
35    !$omp declare variant (f1) match(implementation={atomic_default_mem_order(release)})  ! { dg-error "incorrect property 'release' of 'atomic_default_mem_order' selector" }
36  end subroutine
37  subroutine f55 ()
38    !$omp declare variant (f1) match(implementation={atomic_default_mem_order(foobar)}) ! { dg-error "incorrect property 'foobar' of 'atomic_default_mem_order' selector" }
39  end subroutine
40  subroutine f57 ()
41    !$omp declare variant (f1) match(implementation={atomic_default_mem_order(relaxed)},&
42    !$omp & implementation={atomic_default_mem_order(relaxed)}) ! { dg-error "selector set 'implementation' specified more than once" "" { target *-*-* } 41  }
43  end subroutine
44  subroutine f61 ()
45    !$omp declare variant (f1) match(construct={parallel,parallel}) ! { dg-error "selector 'parallel' specified more than once in set 'construct'" }
46  end subroutine
47  subroutine f62 ()
48    !$omp declare variant (f1) match(construct={target,parallel,do,simd,parallel}) ! { dg-error "selector 'parallel' specified more than once in set 'construct'" }
49  end subroutine
50  subroutine f63 ()
51    !$omp declare variant (f1) match(construct={target,teams,teams})  ! { dg-error "selector 'teams' specified more than once in set 'construct'" }
52  end subroutine
53end module
54