Debian Codegraph @

gcc/testsuite/c-c++-common/tm/pr54893.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -fdump-ipa-tmipa" } */
3 /* { dg-additional-options "-Wno-volatile" { target c++ } } */
4
5 /* Test that volatiles are allowed inside relaxed transactions. */
6
7 volatile int test_var = 0;
8
9 int main()
10 {
11 __transaction_relaxed {
12 test_var++;
13 }
14 }
15
16 /* { dg-final { scan-ipa-dump "GTMA_DOES_GO_IRREVOCABLE" "tmipa" } } */