annotate gcc/testsuite/gcc.dg/tm/irrevocable-5.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-fgnu-tm -fdump-ipa-tmipa -O" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 int a;
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 void foo(void) __attribute__((transaction_safe));
kono
parents:
diff changeset
7 void bar(void) __attribute__((transaction_safe));
kono
parents:
diff changeset
8 void danger(void) __attribute__((transaction_unsafe));
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void wildthing()
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 /* All blocks should be propagated as irrevocable. */
kono
parents:
diff changeset
13 __transaction_relaxed {
kono
parents:
diff changeset
14 if (a)
kono
parents:
diff changeset
15 foo();
kono
parents:
diff changeset
16 else
kono
parents:
diff changeset
17 bar();
kono
parents:
diff changeset
18 danger();
kono
parents:
diff changeset
19 }
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 /* { dg-final { scan-ipa-dump-times "GTMA_DOES_GO_IRREVOCABLE" 1 "tmipa" } } */
kono
parents:
diff changeset
23 /* { dg-final { scan-ipa-dump-times "bb 3 goes irr" 1 "tmipa" } } */
kono
parents:
diff changeset
24 /* { dg-final { scan-ipa-dump-times "bb 4 goes irr" 1 "tmipa" } } */
kono
parents:
diff changeset
25 /* { dg-final { scan-ipa-dump-times "bb 5 goes irr" 1 "tmipa" } } */
kono
parents:
diff changeset
26 /* { dg-final { scan-ipa-dump-times "bb 6 goes irr" 1 "tmipa" } } */