Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tm/reg-promotion.c @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-fgnu-tm -O2 -fdump-tree-lim2" } */ /* Test that `count' is not written to unless p->data>0. */ int count; struct obj { int data; struct obj *next; } *q; void func() { struct obj *p; __transaction_atomic { for (p = q; p; p = p->next) if (p->data > 0) count++; } } /* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim2" } } */