* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / c-c++-common / tm / 20100127.c
blob59f949eb882173b9302ab66355d2a599cc34ab6f
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } */
4 /* Test that `nontrxn' doesn't end up inside the transaction. */
6 typedef struct node {
7 int * val;
8 struct node *next;
9 } node_t;
11 node_t *next;
12 int nontrxn1, nontrxn;
14 static int set_remove(int * val)
16 int result;
17 int * v;
18 __transaction_relaxed {
19 v = next->val;
20 result = (v == val);
21 if (result)
22 result = 2;
24 return result;
27 void test(void *data)
29 extern void bark(void);
30 if (set_remove(0))
31 bark();
32 nontrxn = 99; /* Should be outside transaction. */
35 /* { dg-final { scan-tree-dump-times "_ITM_W.*nontrxn" 0 "tmmark" } } */