Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tm/reg-promotion.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-fgnu-tm -O2 -fdump-tree-lim2" } */ | |
3 | |
4 /* Test that `count' is not written to unless p->data>0. */ | |
5 | |
6 int count; | |
7 | |
8 struct obj { | |
9 int data; | |
10 struct obj *next; | |
11 } *q; | |
12 | |
13 void func() | |
14 { | |
15 struct obj *p; | |
16 __transaction_atomic { | |
17 for (p = q; p; p = p->next) | |
18 if (p->data > 0) | |
19 count++; | |
20 } | |
21 } | |
22 | |
23 /* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim2" } } */ |