Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / memopt-6.c
blobd1a2f1de39c408e21bce8d6a854ca36b010eb0a8
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O -fdump-tree-tmedge --param tm-max-aggregate-size=1" } */
4 struct large { int x[100]; };
5 struct large bark();
6 extern int test (void) __attribute__((transaction_safe));
7 extern int readint (void);
8 struct large lacopy;
10 int f()
12 int i = readint();
13 struct large lala = bark();
14 __transaction_atomic {
15 lala.x[55] = 666;
16 lala = lacopy; /* Aggregate instrumentation. */
18 return lala.x[i];
21 /* { dg-final { scan-tree-dump-times "memcpyRtWn \\\(.*, &lacopy" 1 "tmedge" } } */