re PR c++/58282 (g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw)
2013-10-25 Tom de Vries <tom@codesourcery.com> PR c++/58282 * except.c (build_must_not_throw_expr): Handle flag_exceptions. * g++.dg/tm/noexcept-6.C: New test. From-SVN: r204069
This commit is contained in:
parent
d44365e583
commit
7bf6dc8c9c
|
@ -1,3 +1,9 @@
|
|||
2013-10-25 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR c++/58282
|
||||
* except.c (build_must_not_throw_expr): Handle
|
||||
flag_exceptions.
|
||||
|
||||
2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/58633
|
||||
|
|
|
@ -383,6 +383,9 @@ build_must_not_throw_expr (tree body, tree cond)
|
|||
{
|
||||
tree type = body ? TREE_TYPE (body) : void_type_node;
|
||||
|
||||
if (!flag_exceptions)
|
||||
return body;
|
||||
|
||||
if (cond && !value_dependent_expression_p (cond))
|
||||
{
|
||||
cond = cxx_constant_value (cond);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-10-25 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR c++/58282
|
||||
* g++.dg/tm/noexcept-6.C: New test.
|
||||
|
||||
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.c-torture/execute/pr58831.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