Merge from mainline.
[official-gcc.git] / gcc / testsuite / g++.dg / template / spec24.C
blob08848952e53a0849daac88610c58a054f809a36c
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 1 June 2005 <nathan@codesourcery.com>
4 // PR 20350: ICE on member specialization with later initialization
5 // Origin: Carlo Wood carlo@gcc.gnu.org
7 template <int i> struct Mutex
9   static int mutex;
12 template <int i>
13 int Mutex<i>::mutex = {1};
15 template <> int Mutex<0>::mutex;
16 template <> int Mutex<0>::mutex = 0;
18 void g()
20   Mutex<0>::mutex = 0;