1/* { dg-do compile } */
2/* { dg-options "-fgnu-tm -fdump-ipa-tmipa" } */
3
4/* Test that irrevocability gets set for the obvious case.  */
5
6int global;
7int george;
8
9extern void crap() __attribute__((transaction_unsafe));
10
11void
12foo(){
13    __transaction_relaxed {
14	global++;
15	crap();
16	george++;
17    }
18}
19
20/* { dg-final { scan-ipa-dump-times "GTMA_MAY_ENTER_IRREVOCABLE" 1 "tmipa" } } */
21/* { dg-final { cleanup-ipa-dump "tmipa" } } */
22