1subroutine bar2
2  block
3    !$omp requires unified_shared_memory ! { dg-error "must appear in the specification part of a program unit" }
4  end block
5end
6
7subroutine bar
8contains
9  subroutine foo
10    !$omp requires unified_shared_memory ! { dg-error "must appear in the specification part of a program unit" }
11  end
12end
13
14module m
15contains
16  subroutine foo
17    !$omp requires unified_shared_memory ! { dg-error "must appear in the specification part of a program unit" }
18  end
19end
20
21module m2
22 interface
23  module subroutine foo()
24  end
25 end interface
26end
27
28submodule (m2) m2_sub
29    !$omp requires unified_shared_memory
30contains
31  module procedure foo
32  end
33end
34
35program main
36contains
37  subroutine foo
38    !$omp requires unified_shared_memory ! { dg-error "must appear in the specification part of a program unit" }
39  end
40end
41! { dg-prune-output "not yet supported" }
42