diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/abi-tag1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/abi/abi-tag1.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag1.C b/gcc/testsuite/g++.dg/abi/abi-tag1.C new file mode 100644 index 00000000000..942929cdd35 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/abi-tag1.C @@ -0,0 +1,19 @@ +// { dg-options "-Wabi-tag" } + +// { dg-final { scan-assembler "_Z1fB3barB3fooi" } } +void f(int) __attribute ((abi_tag ("foo","bar"))); + +struct __attribute ((abi_tag ("bar"))) A { }; + +struct B: A { }; // { dg-warning "bar. abi tag" } +struct D { A* ap; }; // { dg-warning "bar. abi tag" } + +// { dg-final { scan-assembler "_Z1gB3baz1AB3bar" } } +void g(A) __attribute ((abi_tag ("baz"))); +void g(A) __attribute ((abi_tag ("baz"))); + +int main() +{ + f(42); + g(A()); +} |