1! { dg-do compile } 2 3! Declare variant directives should only appear in the specification parts. 4 5program main 6 implicit none 7 8 continue 9 10 !$omp declare variant (base: variant) match (construct={parallel}) ! { dg-error "Unexpected \\\!\\\$OMP DECLARE VARIANT statement at .1." } 11contains 12 subroutine base () 13 continue 14 15 !$omp declare variant (variant) match (construct={parallel}) ! { dg-error "Unexpected \\\!\\\$OMP DECLARE VARIANT statement at .1." } 16 end subroutine 17end program 18