gcc/cp/
* pt.c (tsubst_copy_and_build): Handle TRANSACTION_EXPR.
gcc/testsuite/
* g++.dg/tm/template-2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181601
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-11-21 Torvald Riegel <triegel@redhat.com>
+
+ * pt.c (tsubst_copy_and_build): Handle TRANSACTION_EXPR.
+
2011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/50958
2011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/50958
+ case TRANSACTION_EXPR:
+ return tsubst_expr(t, args, complain, in_decl,
+ integral_constant_expression_p);
+
default:
/* Handle Objective-C++ constructs, if appropriate. */
{
default:
/* Handle Objective-C++ constructs, if appropriate. */
{
+2011-11-21 Torvald Riegel <triegel@redhat.com>
+
+ * g++.dg/tm/template-2.C: New test.
+
2011-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/50827
2011-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/50827
--- /dev/null
+// { dg-do compile }
+// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark" }
+
+struct TrueFalse
+{
+};
+
+int global;
+
+template<typename T> int foo()
+{
+ return __transaction_atomic (global + 2)
+ + __transaction_atomic (global + 3);
+}
+
+int f1()
+{
+ return foo<TrueFalse>();
+}
+
+/* { dg-final { scan-tree-dump-times "ITM_RU" 2 "tmmark" } } */
+/* { dg-final { cleanup-tree-dump "tmmark" } } */