// Copyright (C) 2005 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 13 Jun 2005 // Origin: Ivan Godard // Bug 20789: ICE on invalid template struct A; template struct B {}; template struct C { static const int i = A::i; // { dg-error "incomplete" } static const int j = i; B b; }; C c; int i = C::i; int j = C::j;