Debian Codegraph @

gcc/testsuite/g++.dg/template/spec24.C

raw
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 1 June 2005 <[email protected]>
3
4 // PR 20350: ICE on member specialization with later initialization
5 // Origin: Carlo Wood [email protected]
6
7 template <int i> struct Mutex
8 {
9 static int mutex;
10 };
11
12 template <int i>
13 int Mutex<i>::mutex = {1};
14
15 template <> int Mutex<0>::mutex;
16 template <> int Mutex<0>::mutex = 0;
17
18 void g()
19 {
20 Mutex<0>::mutex = 0;
21 }
22