PR c++/65046
[official-gcc.git] / gcc / testsuite / g++.dg / abi / abi-tag14.C
bloba66e6552cbab18c96f37bf2cefd296771d35286f
1 // { dg-options "-Wabi-tag" }
3 inline namespace __cxx11 __attribute ((abi_tag ("cxx11"))) {
4   struct A {};
5 };
7 // { dg-final { scan-assembler "_Z1aB5cxx11" } }
8 A a;                            // { dg-warning "\"cxx11\"" }
10 // { dg-final { scan-assembler "_Z1fB5cxx11v" } }
11 A f() {}                        // { dg-warning "\"cxx11\"" }
13 namespace {
14   A a2;
15   A f2() {}
16   struct B: A {};
19 // { dg-final { scan-assembler "_Z1fPN7__cxx111AE" } }
20 A f(A*) {}
22 // { dg-final { scan-assembler "_Z1gIN7__cxx111AEET_v" } }
23 template <class T> T g() { }
24 template <> A g<A>() { }
26 // { dg-final { scan-assembler "_Z1vIN7__cxx111AEE" { target c++14 } } }
27 #if __cplusplus >= 201402L
28 template <class T> T v = T();
29 void *p = &v<A>;
30 #endif