public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/aoliva/heads/testme)] hardcfr: fix indirect jump
Date: Fri, 20 Oct 2023 03:48:17 +0000 (GMT)	[thread overview]
Message-ID: <20231020034817.0CF733858426@sourceware.org> (raw)

https://gcc.gnu.org/g:9231203d6d72f1a9e10e564fc4ebd6e7abb74c9f

commit 9231203d6d72f1a9e10e564fc4ebd6e7abb74c9f
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Oct 19 02:52:45 2023 -0300

    hardcfr: fix indirect jump

Diff:
---
 gcc/gimple-harden-control-flow.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/gimple-harden-control-flow.cc b/gcc/gimple-harden-control-flow.cc
index ac4a329ebad1..546837a450b8 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -1321,9 +1321,13 @@ pass_harden_control_flow_redundancy::execute (function *fun)
 		   || bb == bb_eh_cleanup)
 		: (!is_a <gcall *> (stmt)
 		   || !gimple_call_noreturn_p (stmt))
-		? (/* Catch cases in which successors would be
+		? (stmt_can_make_abnormal_goto (stmt)
+		   /* ??? Check before indirect nonlocal goto, or
+		      calls thereof?  */
+		   ? false
+		   /* Catch cases in which successors would be
 		      expected.  */
-		   gcc_unreachable (), false)
+		   : (gcc_unreachable (), false))
 		: (!flag_exceptions
 		   || gimple_call_nothrow_p (as_a <gcall *> (stmt)))
 		? check_before_nothrow_noreturn_calls

             reply	other threads:[~2023-10-20  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  3:48 Alexandre Oliva [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-29 22:11 Alexandre Oliva
2023-06-29 18:42 Alexandre Oliva

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=20231020034817.0CF733858426@sourceware.org \
    --to=aoliva@gcc.gnu.org \
    --cc=gcc-cvs@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).