This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282

--- Comment #4 from vries at gcc dot gnu.org ---
Tentative fix:
...
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ee3503c..c8b328c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5189,7 +5189,7 @@ finish_transaction_stmt (tree stmt, tree compound_stmt,
int flags, tree noex)

   /* noexcept specifications are not allowed for function transactions.  */
   gcc_assert (!(noex && compound_stmt));
-  if (noex)
+  if (noex && flag_exceptions)
     {
       tree body = build_must_not_throw_expr (TRANSACTION_EXPR_BODY (stmt),
                          noex);
@@ -5210,7 +5210,7 @@ tree
 build_transaction_expr (location_t loc, tree expr, int flags, tree noex)
 {
   tree ret;
-  if (noex)
+  if (noex && flag_exceptions)
     {
       expr = build_must_not_throw_expr (expr, noex);
       SET_EXPR_LOCATION (expr, loc);
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]