public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/110159] ICEs for C++ Contracts test cases with '-fno-exceptions'
Date: Tue, 16 Jul 2024 18:52:06 +0000	[thread overview]
Message-ID: <bug-110159-4-ISMxcu7Caq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110159-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110159

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:40a990c8b512fd25bd7d7b45aa509e1880d77209

commit r15-2076-g40a990c8b512fd25bd7d7b45aa509e1880d77209
Author: Nina Ranns <dinka.ranns@gmail.com>
Date:   Thu Jul 11 17:47:34 2024 +0100

    c++/contracts: ICE in C++ Contracts with '-fno-exceptions' [PR 110159]

    We currently only initialise terminate_fn if exceptions are enabled.
    However, contract handling requires terminate_fn when building the
    contract because a contract failure may result in std::terminate call
    regardless of whether the exceptions are enabled. Refactored
    init_exception_processing to extract the initialisation of
    terminate_fn. New function init_terminate_fn added that initialises
    terminate_fn if it hasn't already been initialised. Call to terminate_fn
    added in cxx_init_decl_processing if contracts are enabled.

            PR c++/110159

    gcc/cp/ChangeLog:

            * cp-tree.h (init_terminate_fn): Declaration of a new function.
            * decl.cc (cxx_init_decl_processing): If contracts are enabled,
            call init_terminate_fn.
            * except.cc (init_exception_processing): Function refactored to
            call init_terminate_fn.
            (init_terminate_fn): Added new function that initializes
            terminate_fn if it hasn't already been initialised.

    gcc/testsuite/ChangeLog:

            * g++.dg/contracts/pr110159.C: New test.

    Signed-off-by: Nina Ranns <dinka.ranns@gmail.com>

  reply	other threads:[~2024-07-16 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 16:39 [Bug c++/110159] New: " tschwinge at gcc dot gnu.org
2024-07-16 18:52 ` cvs-commit at gcc dot gnu.org [this message]
2024-07-16 18:53 ` [Bug c++/110159] " jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-110159-4-ISMxcu7Caq@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).