Message ID | 20220913085203.CD1E9139B3@imap2.suse-dmz.suse.de |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp2252675wrt; Tue, 13 Sep 2022 01:52:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4msWE20dYUUSXvB1pYXsGUbqR1L3FRXD134oDMCtpEXz0BtaNYJZtlOQ/sOwr862Bzcmo5 X-Received: by 2002:a17:907:2c4f:b0:77d:f3eb:f079 with SMTP id hf15-20020a1709072c4f00b0077df3ebf079mr5229881ejc.356.1663059179319; Tue, 13 Sep 2022 01:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663059179; cv=none; d=google.com; s=arc-20160816; b=bMZJCugu+YNs1JdE1IZTFL0SUto/EMk8OeP2/4BhmtwUSWNAA8YRr4dBG0XrABPkz3 gBMMhnw++h2zS9Dcpqm4dJtq/cnpsjuF9mDYqfeHaaBHD+fuhHxtWgCIFJsMf+Eyp4uF 7vSySqZDUJr4m3ONrn8qzk6/rEn3uXtYwkHGe4hZc+MqP8Ph9zoro7ZkAmhOooJs2jkt DSvb5P9KUxc/wuvELsYd7AmlvqFpXPqnfou6BZiehpa2ogQzuN+gH81XYzbhyc9tELE0 mdhdepZcILiDRXeQ1YBFdCRMv1/9PJ8fXJ9xsPxSuPIW9CH6kJBME2jCVrFr8IUOOC7F TjVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:message-id :mime-version:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=rAEJM0TAlY6kYxWxZrKR0d5Dv8g7iMJNzod3X/cdaR8=; b=lBWD8Bx6DrjTxRcVIirsjfNuR9MdX/9mQVFz2LR4COtTjCpm/eFbGf6x1cK1Q2tHUp 7f//Zts6Rl8ov+Us2gfaQDfdD+XxVeDnMux12jEb2t9gKcWXbWF3AoM51lMgmHbqJUME DAghlAA6pSFKy1ae5+IlxuFrWt1WCEnig1zbrAJVPGRD5p3dtTJ2OVYK+vfPVCEelggv OZSMX0GcA6NOTm4Lc/s+Zkp3z3aK2F/VwKDlrZ6LlnGfw55J520r5X/fFR7qIrGUMjtN hl2ozrWg9EfM0FoQniDKzm2kp//TDzqq9YRZx0YcE8eoG9ZxZOpYeLA5cb1qyJKaX1I+ F60w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cEJJgHgW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bf15-20020a0564021a4f00b0044f2b52f3c9si7813859edb.383.2022.09.13.01.52.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 01:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cEJJgHgW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4C7483850866 for <ouuuleilei@gmail.com>; Tue, 13 Sep 2022 08:52:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C7483850866 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663059172; bh=rAEJM0TAlY6kYxWxZrKR0d5Dv8g7iMJNzod3X/cdaR8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cEJJgHgWSdC5OClCyczUCuQRxIWc0I2RzdtEc3I7HkWN8rMr3y05hzlFD1GMYhEU4 7epyy37iYHLwkbGz2Gsqbmr4M47n3mOZ+FeDkznohtAJCgcry2fyTfO85veo+8D/V2 2wGF/gKemGBaPninxIiphMKXZUh9rmGr3e1oUDBc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id C155B385117F for <gcc-patches@gcc.gnu.org>; Tue, 13 Sep 2022 08:52:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C155B385117F Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E8DB45C04D for <gcc-patches@gcc.gnu.org>; Tue, 13 Sep 2022 08:52:03 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CD1E9139B3 for <gcc-patches@gcc.gnu.org>; Tue, 13 Sep 2022 08:52:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id a2ojMbNEIGMZIgAAMHmgww (envelope-from <rguenther@suse.de>) for <gcc-patches@gcc.gnu.org>; Tue, 13 Sep 2022 08:52:03 +0000 Date: Tue, 13 Sep 2022 10:52:03 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] middle-end/106909 - CTRL altering flag after folding MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20220913085203.CD1E9139B3@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Richard Biener <rguenther@suse.de> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743843942145545424?= X-GMAIL-MSGID: =?utf-8?q?1743843942145545424?= |
Series |
middle-end/106909 - CTRL altering flag after folding
|
|
Commit Message
Richard Biener
Sept. 13, 2022, 8:52 a.m. UTC
The following makes sure to clear the CTRL altering flag when folding emits a __builitin_unreachable in place of a virtual call which now might become a trap. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/106909 * gimple-fold.cc (gimple_fold_call): Clear the ctrl-altering flag of a unreachable call. --- gcc/gimple-fold.cc | 1 + 1 file changed, 1 insertion(+)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index a1704784bc9..9055cd8982d 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -5512,6 +5512,7 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace) { location_t loc = gimple_location (stmt); gimple *new_stmt = gimple_build_builtin_unreachable (loc); + gimple_call_set_ctrl_altering (new_stmt, false); /* If the call had a SSA name as lhs morph that into an uninitialized value. */ if (lhs && TREE_CODE (lhs) == SSA_NAME)