Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tm/20100519.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-fgnu-tm -O" } */ | |
3 | |
4 typedef struct coordinate { | |
5 double x; | |
6 } coordinate_t; | |
7 | |
8 coordinate_t elementPtrC[3]; | |
9 | |
10 __attribute__((transaction_safe)) | |
11 void TMelement_alloc (coordinate_t* coordinates, int numCoordinate) | |
12 { | |
13 int i; | |
14 for (i = 0; i < numCoordinate; i++) { | |
15 elementPtrC[i] = coordinates[i]; | |
16 } | |
17 } |