1! { dg-do compile }
2! { dg-options "-fopenmp -fcray-pointer" }
3
4  integer :: a, b
5  pointer (ip, a)
6
7  b = 2
8  ip = loc (b)
9!$omp parallel default (none) shared (ip)
10  a = 1
11!$omp end parallel
12
13!$omp parallel default (none) private (ip, b)
14  b = 3
15  ip = loc (b)
16  a = 1
17!$omp end parallel
18
19!$omp parallel default (none)	! { dg-message "note: enclosing 'parallel'" }
20  a = 1		! { dg-error "'ip' not specified in enclosing 'parallel'" }
21!$omp end parallel
22end
23