From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11716 invoked by alias); 2 Sep 2013 10:31:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11686 invoked by uid 48); 2 Sep 2013 10:31:27 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw Date: Mon, 02 Sep 2013 10:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg00044.txt.bz2 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); ...