// PR c++/44587 // { dg-do run } template struct A { static const char *p; }; template const char *A::p = N; template struct B { static const char c[1]; typedef A::c> C; }; template const char B::c[1] = ""; template struct D { static const char c[1]; typedef A C; }; template const char D::c[1] = ""; template struct E { static int *ip; }; template int* E::ip = &I; template struct F { static int i; typedef E::i> C; }; template int F::i; template struct G { static int i; typedef E C; }; template int G::i; #define AS(X) if (!(X)) return 1; int main() { AS(B::C::p == B::c); AS(B::C::p == B::c); AS(B::C::p != B::c); AS(D::C::p == D::c); AS(D::C::p == D::c); AS(D::C::p != D::c); }