Mercurial > hg > CbC > CbC_gcc
view 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 |
line wrap: on
line source
// Attribute used on a member function or static data member // of a template should cause them to be instantiated along // with the class itself. // { dg-final { scan-assembler "_ZN1AIiE1fEv" } } // { dg-final { scan-assembler "_ZN1AIiE1tE" } } template <class T> struct A { void f() __attribute ((used)); static T t __attribute ((used)); }; template <class T> void A<T>::f() { } template <class T> T A<T>::t; A<int> a;