Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/attr-used-1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // Attribute used on a member function or static data member |
2 // of a template should cause them to be instantiated along | |
3 // with the class itself. | |
4 | |
5 // { dg-final { scan-assembler "_ZN1AIiE1fEv" } } | |
6 // { dg-final { scan-assembler "_ZN1AIiE1tE" } } | |
7 | |
8 template <class T> struct A | |
9 { | |
10 void f() __attribute ((used)); | |
11 static T t __attribute ((used)); | |
12 }; | |
13 | |
14 template <class T> void A<T>::f() { } | |
15 template <class T> T A<T>::t; | |
16 | |
17 A<int> a; |