aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tm/pr51472.c
blob: 67f0557353146238cb094ffd761fc9d930f4b5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -O  --param tm-max-aggregate-size=32" } */
/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */

typedef int __attribute__ ((vector_size (16))) vectype;
vectype v;

void
foo (int c)
{
  vectype *p = __builtin_malloc (sizeof (vectype));
  __transaction_atomic
  {
    *p = v;
    if (c)
      __transaction_cancel;
  }
}