2 // { dg-do compile { target c++11 } }
5 typedef __INTPTR_TYPE__ intptr_t;
6 template<intptr_t> struct A {};
14 A<(intptr_t)&&lab1 - (__INTPTR_TYPE__)&&lab2> c; // { dg-error "not a constant integer" }
15 A<(intptr_t)&&lab1 - (__INTPTR_TYPE__)&&lab1> d;
16 A<(intptr_t)&a - (intptr_t)&b> e; // { dg-error "is not a constant expression" }
17 A<(intptr_t)&a - (intptr_t)&a> f;
18 A<(intptr_t)sizeof(a) + (intptr_t)&a> g; // { dg-error "not a constant integer" }
19 A<(intptr_t)&a> h; // { dg-error "conversion from pointer type" }