1 // PR c++/41109, 41110, 41134
2 // { dg-options "-Wunused" }
3 
memory_consumption(const int & t)4 int memory_consumption(const int &t) { return sizeof(t); }
5 
6 int s;
g()7 int g() { return memory_consumption(s); }
8 
9 template <int> struct X { static const int s = 2; };
10 
f()11 template <typename T> int f() {
12   const unsigned int dim = 2;
13   return X<dim>::s;
14 }
15 
16 template int f<int>();
17 
18 static int i;
h()19 template <typename> int h() { return i; }
20