2 // { dg-do compile { target c++11 } }
6 __attribute__((used)) S1() noexcept(noexcept(this->foo())) { }
12 __attribute__((used)) void bar() noexcept(noexcept(this->foo())) { }
18 void __attribute__((used)) bar() noexcept(noexcept(this->foo())) { }
24 [[gnu::used]] void bar() noexcept(noexcept(this->foo())) { }
30 void bar() noexcept(noexcept(this->foo())) __attribute__((used)) { }
38 [[gnu::used]] void bar() noexcept(noexcept(this->foo())) { }
54 // Make sure that we did emit the functions marked with attribute used
55 // even though they're not referenced in this TU. (Well, the S1()
57 // { dg-final { scan-assembler "_ZN2S1ILi1EEC1Ev" } }
58 // { dg-final { scan-assembler "_ZN2S1ILi1EEC2Ev" } }
59 // { dg-final { scan-assembler "_ZN2S2ILi1EE3barEv" } }
60 // { dg-final { scan-assembler "_ZN2S3ILi1EE3barEv" } }
61 // { dg-final { scan-assembler "_ZN2S4ILi1EE3barEv" } }
62 // { dg-final { scan-assembler "_ZN2S5ILi1EE3barEv" } }
63 // { dg-final { scan-assembler "_ZN2S6ILi1EE1NILi1EE3barEv" } }