Debian Codegraph @

gcc/testsuite/g++.dg/abi/vague1.C

raw
1 // Test that we don't emit unneeded copies of static data member template
2 // instantiations.
3
4 // Disable debug info so we don't get confused by the symbol name there.
5 // { dg-options "-g0" }
6
7 template <class T> struct A {
8 static const T t = 0;
9 };
10
11 template <class T> const T A<T>::t;
12
13 int i;
14 int main ()
15 {
16 i = A<int>::t; // Should just use the value
17 }