1 // PR c++/99176
2 // { dg-do compile { target c++11 } }
3 
4 constexpr const int *p = nullptr;
5 constexpr int *q1 = const_cast<int*>(p);
6 constexpr int *q2 = (int *)(const int *) nullptr;
7 
8 struct B { };
9 struct D : B { };
10 constexpr B *q3 = static_cast<B*>(nullptr);
11 constexpr D *pd = nullptr;
12 constexpr B *pb = nullptr;
13 constexpr B *q4 = static_cast<B*>(pd);
14 constexpr D *q5 = static_cast<D*>(pb);
15