1// { dg-do compile } 2 3// Copyright (C) 2003 Free Software Foundation, Inc. 4// Contributed by Nathan Sidwell 21 Mar 2003 <nathan@codesourcery.com> 5 6// PR 9978. We rejected a constant expression. 7 8enum { val = 1 }; 9 10template <class T> 11struct Bar 12{ 13 static const int A = val; 14 static const int B = A + 1; 15}; 16