diff gcc/testsuite/gcc.dg/tm/memopt-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/tm/memopt-1.c	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */
+
+long g, xxx, yyy;
+extern void george() __attribute__((transaction_safe));
+extern void ringo(long int) __attribute__((transaction_safe));
+int i;
+
+void
+f()
+{
+  __transaction_relaxed {
+    g = 666;
+    george();
+    if (i == 9)
+      goto bye;
+    xxx=8;
+    yyy=9;
+    for (i=0; i < 10; ++i)
+      ringo(g);
+  bye:
+    ringo(g);
+  }
+}
+
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU\[248\] \\(&g\\);" 1 "tmmemopt" } } */
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaRU4 \\(&i," 1 "tmmemopt" } } */
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU4 \\(&i\\);" 1 "tmmemopt" } } */
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaWU4 \\(&i," 1 "tmmemopt" } } */