Message ID | ZWmMi5qkXwmNgBYY@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp943274vqy; Thu, 30 Nov 2023 23:35:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHu2os4Z88//r0HWRuNd/k7dX8cxtQ4XKQfuSFt5RSiNL50M3VjqYx9hV2tXTaceJlyHM1l X-Received: by 2002:a0c:eb0d:0:b0:67a:9abc:b737 with SMTP id j13-20020a0ceb0d000000b0067a9abcb737mr547438qvp.31.1701416105970; Thu, 30 Nov 2023 23:35:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701416105; cv=pass; d=google.com; s=arc-20160816; b=RxHT4MNbdhLTG3ciPjt1X3WIPw1vqitv7Tjo1bqkpEMpQOmMIg2t8Hj5bIUjEG9sYB QK8dvA+ZoGRS19BmstfZL5FQ6n2MsUrtPv/76yXUokdA82hVdHIu7jzQR9j2YcVNzqIp 2VtzqRjDb8mbr+jjqXbLFRk58Zdur5lLWrQSazZpWnSgK3uCvOO7I8Kvm/AytN6VqDQV 0E8f20LnWb53nxVoCUSar0k1B1yjYCHdcsSvs2PacRZo94zm9Y1tBBEhoF3V0KtpeibX 5i8tTJx+grlDlBAlNe0pXN+aOUT4jQ9UyEBTF8n35ap9DEJ84S1LiucAwOjnn4PZRejY NPEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Zvc1T6FaGdA4cpVeUI4T+7OEG6AkKj93DYoj9KBxCgo=; fh=FCjeRajqaQYHMkQtfIia8KT5yBac53mYOLLyJhYG/AY=; b=nRFDzUnOAxvVfEDzEmZY9o+fWiqYQt+iqjGRM15jsEcm90EEGH36f+WYHNKyums9WV yXKmtOrhb0CQfbqs1Pz6Dt0bja9zRURqho78xdEP+uw/NuSzqjhMAnEoh4R6JAUctyB2 rGBp5OZDeAhPzMB5zAuceDouPwgTiwnrRnN/TXSVdx6V0UO9vpdZNzlOHdQZNO5pjYsM JrQsewMpWk+CiSbUwvEqf/8U9VGTJQmVHw/PAYX49IIyGN3vc7VCEsoXnOuvnZQoYQJp WJcnYLKCToufWjKdI7wWeIfvGzzIcNUxaIgdLVqYa/5NajBwCEHRuELoXM23n684g6+1 ceSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g8bfHX5w; arc=pass (i=1); 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=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e13-20020a0562140d8d00b0067a5bf09533si2880161qve.239.2023.11.30.23.35.05 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:35:05 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=g8bfHX5w; arc=pass (i=1); 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=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB4613858C30 for <ouuuleilei@gmail.com>; Fri, 1 Dec 2023 07:35:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D1D293858C62 for <gcc-patches@gcc.gnu.org>; Fri, 1 Dec 2023 07:34:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1D293858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D1D293858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701416083; cv=none; b=B+bCf8c6gCVxOij3xoPiaOzphSBVk1M4FV01Sl9vkBdSxdKWw6eQkuF7PvbJ6zPauCmGsxa+6lFNmUrjNC/v/+d1DjkaxHvwdlRWocgYpPMAbLKeokcKwd0kLw8koAY3cdAgDEs9HjJkl28eThNg/oSyIJzuQtAIiU0GEtv4LmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701416083; c=relaxed/simple; bh=PYiK3fPYtgaNWRVEg2Q76R0JdkvHxUchvujCxozUq9U=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=UXiQI1M6Ne+otoYOrDWR8NX1PJhm5ZFw1XXPxcnr4Z+aSfz8tcdosCSWiWNXMob4n6tkJQqB8qu7Nnp1EAz/cOqLd9TueUyINk6r7DDFSJ/wWRUzzWZM2dpAE9QDBAA+I4n6yYfLdQt2DD/8xZav6L9zXkql5zmknBN3tY6A7m0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701416081; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=Zvc1T6FaGdA4cpVeUI4T+7OEG6AkKj93DYoj9KBxCgo=; b=g8bfHX5wyKPMlfbyyc7r4FCxTEkLx8+w+HefmVK87GPR59JwZKTyG20/cfIblJoC5b6XKS 2di/QulOm+tImH+5Z586ptuPFGR3XynEC0YsVecRumPto+djDgBbrU+AmSsacYg6cHTYJ7 82NgRxTauBDCwKKSJ5gYCxrF+pIIbXM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-frjP0tjTOjWYwXp5vA3UhA-1; Fri, 01 Dec 2023 02:34:39 -0500 X-MC-Unique: frjP0tjTOjWYwXp5vA3UhA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 80E9B185A784; Fri, 1 Dec 2023 07:34:39 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44B5F40C6EBB; Fri, 1 Dec 2023 07:34:39 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3B17YatU540163 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 1 Dec 2023 08:34:37 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B17YZgi540162; Fri, 1 Dec 2023 08:34:35 +0100 Date: Fri, 1 Dec 2023 08:34:35 +0100 From: Jakub Jelinek <jakub@redhat.com> To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] lower-bitint: Fix ICE on bitint-39.c Message-ID: <ZWmMi5qkXwmNgBYY@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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.30 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> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784064094392443980 X-GMAIL-MSGID: 1784064094392443980 |
Series |
lower-bitint: Fix ICE on bitint-39.c
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Dec. 1, 2023, 7:34 a.m. UTC
Hi! torture/bitint-39.c ICEs with -O1; the problem is that the finish_arith_overflow code in one spot replaces use_stmt with an assignment or cast, but if unlucky and m_gsi iterator is the same statement, when the code later tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_EOL); g = gimple_build_assign (var, clobber); gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); it will insert after iterator which contains already replaced statement and that causes the gimple chain corruption. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-12-01 Jakub Jelinek <jakub@redhat.com> * gimple-lower-bitint.cc (bitint_large_huge::finish_arith_overflow): When replacing use_stmt which is gsi_stmt (m_gsi), update m_gsi to the new statement. Jakub
Comments
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > torture/bitint-39.c ICEs with -O1; the problem is that the > finish_arith_overflow code in one spot replaces use_stmt with an > assignment or cast, but if unlucky and m_gsi iterator is the same statement, > when the code later > tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_EOL); > g = gimple_build_assign (var, clobber); > gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); > it will insert after iterator which contains already replaced statement and > that causes the gimple chain corruption. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok > for trunk? OK. > 2023-12-01 Jakub Jelinek <jakub@redhat.com> > > * gimple-lower-bitint.cc (bitint_large_huge::finish_arith_overflow): > When replacing use_stmt which is gsi_stmt (m_gsi), update m_gsi to > the new statement. > > --- gcc/gimple-lower-bitint.cc.jj 2023-11-30 10:57:40.095555940 +0100 > +++ gcc/gimple-lower-bitint.cc 2023-11-30 12:46:34.715093396 +0100 > @@ -3682,6 +3682,8 @@ bitint_large_huge::finish_arith_overflow > else > g = gimple_build_assign (lhs2, NOP_EXPR, ovf); > gsi_replace (&gsi, g, true); > + if (gsi_stmt (m_gsi) == use_stmt) > + m_gsi = gsi_for_stmt (g); > break; > } > } > > Jakub > >
--- gcc/gimple-lower-bitint.cc.jj 2023-11-30 10:57:40.095555940 +0100 +++ gcc/gimple-lower-bitint.cc 2023-11-30 12:46:34.715093396 +0100 @@ -3682,6 +3682,8 @@ bitint_large_huge::finish_arith_overflow else g = gimple_build_assign (lhs2, NOP_EXPR, ovf); gsi_replace (&gsi, g, true); + if (gsi_stmt (m_gsi) == use_stmt) + m_gsi = gsi_for_stmt (g); break; } }