]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/tm/attrib-3.C
Merge from transactional-memory branch.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / tm / attrib-3.C
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm -fdump-tree-optimized-asmname" }
3
4 struct __attribute__((transaction_safe)) A
5 {
6 };
7
8 struct B : public A
9 {
10 void f();
11 };
12
13 struct C
14 {
15 };
16
17 struct D : public C
18 {
19 };
20
21 struct E : public D, public A
22 {
23 void f();
24 };
25
26 void B::f() { }
27 void E::f() { }
28
29 // { dg-final { scan-tree-dump-times "_ZN1B1fEv" 1 "optimized" } }
30 // { dg-final { scan-tree-dump-times "_ZGTtN1B1fEv" 1 "optimized" } }
31 // { dg-final { scan-tree-dump-times "_ZN1E1fEv" 1 "optimized" } }
32 // { dg-final { scan-tree-dump-times "_ZGTtN1E1fEv" 1 "optimized" } }
33 // { dg-final { cleanup-tree-dump "optimized" } }