Testcase for PR58282

2013-09-08  Tom de Vries  <tom@codesourcery.com>

	PR c++/58282
	* g++.dg/tm/noexcept-6.C: New test.

From-SVN: r202360
This commit is contained in:
Tom de Vries 2013-09-07 23:31:58 +00:00 committed by Tom de Vries
parent 6df2ca09e9
commit e4fc429f7d
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* g++.dg/tm/noexcept-6.C: New test.
2013-09-06 Joern Rennecke <joern.rennecke@embecosm.com>
* gcc.target/arc/cond-set-use.c: New test.

View File

@ -0,0 +1,23 @@
// { dg-do compile }
// { dg-options "-fno-exceptions -fgnu-tm -O -std=c++0x -fdump-tree-tmlower" }
struct TrueFalse
{
static constexpr bool v() { return true; }
};
int global;
template<typename T> int foo()
{
return __transaction_atomic noexcept(T::v()) (global + 1);
}
int f1()
{
return foo<TrueFalse>();
}
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */
/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */
/* { dg-final { cleanup-tree-dump "tmlower" } } */