1 // CWG issue 2310
2 // { dg-do compile { target c++11 } }
3 
4 template<typename A, typename B> struct check_derived_from {
5   static A a;
6   static constexpr B *p = &a;	// { dg-error "cannot convert" }
7   int ar[p-p+1];  // { dg-error "13:size of array is not an integral constant-expression" }
8 };
9 struct W { int i; };
10 struct Z : W
11 {
12   check_derived_from<Z, W> cdf;
13 };
14