From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 0CF733858426; Fri, 20 Oct 2023 03:48:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CF733858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697773697; bh=F+curOU51RU4J1QqwEdS+SY8rCX1R5koEp9AIN1AyR0=; h=From:To:Subject:Date:From; b=ElGhVThvn4H88Hl8+lLQVjBuwZ4BvN/ExMSW/oXwpi8e2fS2j0W+IA3z8rAq3/2RR E6sl5Qt9Y89yk4I8aGkxCydK4DwD3XFh0iOfY4/EJBWVpz6/URr/L9neu4778p4UI2 ykKEtfsSE6wmoiWUQAJNF7UA9V1467oEwAfE8xJw= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] hardcfr: fix indirect jump X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: a3430377432e2724db34eba513d39dca93a2e8dc X-Git-Newrev: 9231203d6d72f1a9e10e564fc4ebd6e7abb74c9f Message-Id: <20231020034817.0CF733858426@sourceware.org> Date: Fri, 20 Oct 2023 03:48:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9231203d6d72f1a9e10e564fc4ebd6e7abb74c9f commit 9231203d6d72f1a9e10e564fc4ebd6e7abb74c9f Author: Alexandre Oliva 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 (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 (stmt))) ? check_before_nothrow_noreturn_calls