summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm/memopt-13.c
blob: 9db096a3407c8d185a101f96ffb52f9a5e636790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } */

struct large { int x[100]; };
struct large large_global;
extern struct large function (void) __attribute__((transaction_safe));

void f()
{
  __transaction_atomic {
      large_global = function();
  }
}

/* { dg-final { scan-tree-dump-times "memcpyRnWt \\\(&large_global," 1 "tmmark" } } */