public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/100409] C++ FE elides pure throwing call
Date: Tue, 04 May 2021 06:46:17 +0000	[thread overview]
Message-ID: <bug-100409-4-H4cDCjAN7P@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100409-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Runtime testcase that aborts:

int x, y;
int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
int __attribute__((noinline)) foo2 () { foo (); return y; }

int __attribute__((noinline)) bar()
{
  int a[2];
  x = 1;
  try {
    int res = foo2 ();
    a[0] = res;
  } catch (...) {
      return 0;
  }
  return 1;
}

int main()
{
  if (bar ())
    __builtin_abort ();
  return 0;
}

  reply	other threads:[~2021-05-04  6:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04  6:45 [Bug c++/100409] New: " rguenth at gcc dot gnu.org
2021-05-04  6:46 ` rguenth at gcc dot gnu.org [this message]
2021-05-05  8:02 ` [Bug c++/100409] " rguenth at gcc dot gnu.org
2021-07-08  7:25 ` rguenth at gcc dot gnu.org
2021-07-08  8:19 ` harald at gigawatt dot nl
2021-07-08  8:38 ` rguenth at gcc dot gnu.org
2021-07-08  8:38 ` rguenth at gcc dot gnu.org
2021-07-08  8:39 ` rguenth at gcc dot gnu.org
2021-07-08  8:44 ` rguenth at gcc dot gnu.org
2021-07-08  9:17 ` harald at gigawatt dot nl
2021-07-08  9:20 ` rguenth at gcc dot gnu.org
2021-07-08  9:41 ` rguenth at gcc dot gnu.org
2021-07-08 13:15 ` mpolacek at gcc dot gnu.org
2021-07-08 13:53 ` jason at gcc dot gnu.org
2021-07-08 14:09 ` rguenth at gcc dot gnu.org
2021-07-08 15:13 ` jason at gcc dot gnu.org
2021-07-08 22:06 ` mpolacek at gcc dot gnu.org
2022-01-05 14:41 ` rguenth 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-100409-4-H4cDCjAN7P@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).