summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm/pr51472.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/pr51472.c')
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr51472.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/pr51472.c b/gcc/testsuite/gcc.dg/tm/pr51472.c
new file mode 100644
index 00000000000..2897c3d78c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr51472.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O --param tm-max-aggregate-size=32" } */
+
+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;
+ }
+}