1// { dg-do compile }
2// Origin: C++ standard, [temp.arg.nontype]/3
3
4template<int* p> class X { };
5
6int a[10];
7struct S { int m; static int s; } s;
8
9X<&a[2]> x3;                    // { dg-error "" } address of array element
10X<&s.m> x4;                     // { dg-error "" } address of non-static member
11X<&s.s> x5;                     // { dg-error "" } &S::s must be used
12X<&S::s> x6;                    // OK: address of static member
13
14