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:
parent
6df2ca09e9
commit
e4fc429f7d
|
@ -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.
|
||||
|
|
|
@ -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" } } */
|
Loading…
Reference in New Issue