From patchwork Mon Apr 3 08:46:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 78413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2151199vqo; Mon, 3 Apr 2023 01:47:33 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4u9PwBEHfilfOcZhSo1lqb50bQE9XhpSw/fqeb/238gTCwK6voV3gHK0j5lixocmOSFRH X-Received: by 2002:a17:907:b689:b0:93a:6e9c:262e with SMTP id vm9-20020a170907b68900b0093a6e9c262emr37512615ejc.23.1680511653743; Mon, 03 Apr 2023 01:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680511653; cv=none; d=google.com; s=arc-20160816; b=wom81eFvLRlXzJ6gXwu7Fr2WGm2ek3wSmFWSe69c4VjsDyfIJwIH+seZ4uPszhnev8 r+hnS8dmqV+BXlmF/BWre5ndi87dHdfCHaBNMkgHE/V6qxPAa28bqmAkrJ+5A4dAObvS PV9tn7hvSxHvWCaO2gADBCuw3XaWfqL4N0B4zvKm/CONqNjDC274a99aNcmjdxCt2tdd s1qqpRJipFTDK2JiGc97mq+R7VhQJVS51LnIaPRIaBt3sLLK4KG2qf+fsCV4S8GwazHi iafw35Myyltwfk58GKUXQSqGLwSWXBfMcur4MKBjFa27LCPYT4nbvQYP0PZKEZxHZaBC W5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding:cc :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=YD3X6vzsxFoO8FQbR0Bl/Fb3KiOGjN0M513p+CJ/77k=; b=Xz8hKSKAWYbe1ADt6/7YfR0h6UE1MDAnz35xj76ikYUTyNH8Wb6VDWp6SZGIDXR3YA jLLwSJkDmxRJ4Rj/9T94DojSHiDc/aRHqofBHFGKVqwApkCxhGU4AL3zesriLGaraIdC CIuZKqToZMPrjK4885DH8aRTgmVMtIdWKxE9w40OV0EWJm9Bp8Z8U3076CtT4sCMi2E1 jGh4FVf3XEaAoHLDpqw/ySrhnGnBLc8veqDnf8Dq9+5LzFSSONeNJh+7k9UoZ+0OzXfU QFFc+JIUuE+9EBiTXYQk8VHSKR5xssEP/sSITtYAZ0ytGPwNfkNh6L3XJPpjPY2v9rOx g8og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qUOC1Chd; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bh16-20020a170906a0d000b009331d7ae4e8si6600612ejb.77.2023.04.03.01.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 01:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qUOC1Chd; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A692C3858C20 for ; Mon, 3 Apr 2023 08:47:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id C95163858D39 for ; Mon, 3 Apr 2023 08:46:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C95163858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz 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-out1.suse.de (Postfix) with ESMTPS id D708F21A4B; Mon, 3 Apr 2023 08:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1680511618; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YD3X6vzsxFoO8FQbR0Bl/Fb3KiOGjN0M513p+CJ/77k=; b=qUOC1ChdJCzx1WqKyn2TrPqBLbPY2XnPW+Q94UY8qX9ea44UcVe20/APdkjkEq98Db3CIn TN1K9EJKYVXS2tmCXxsfdTLveC0XD/GoYM3MTL1wJ7KvNpmRJqmpBhm6j5TSQagMsH/6oX 6Tys6o6oLzSunfAz8JnmGqtJOnBp6Ok= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1680511618; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YD3X6vzsxFoO8FQbR0Bl/Fb3KiOGjN0M513p+CJ/77k=; b=NZhFTMiwbhtWZjFMhxJLSDJmL8Xh/JsWcP6KFc5u/8kWpHvbdbnD0qHbZZzBAlGiPr/usL BVJMzcNjCaI+vCDg== 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 C5A181331A; Mon, 3 Apr 2023 08:46:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JFISL4KSKmThTAAAMHmgww (envelope-from ); Mon, 03 Apr 2023 08:46:58 +0000 Message-ID: <94fb1c9b-60bd-25f3-9eb7-cbac8213dfd0@suse.cz> Date: Mon, 3 Apr 2023 10:46:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] driver: drop flag_var_tracking_assignments flag To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Richard Biener 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762144187571382315?= X-GMAIL-MSGID: =?utf-8?q?1762144187571382315?= The revision r13-259-g76db543db88727 moved a condition from one file to another, but now we do not drop x_flag_var_tracking_assignments as it was done before the mentioned revision. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR driver/108241 gcc/ChangeLog: * opts.cc (finish_options): Drop also x_flag_var_tracking_assignments. gcc/testsuite/ChangeLog: * gcc.dg/pr108241.c: New test. * gcc.dg/pr79570.c: Add also -g option. --- gcc/opts.cc | 1 + gcc/testsuite/gcc.dg/pr108241.c | 63 +++++++++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/pr79570.c | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/pr108241.c diff --git a/gcc/opts.cc b/gcc/opts.cc index f102c1328b9..fb2e5388ab1 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1384,6 +1384,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, } opts->x_flag_var_tracking = 0; opts->x_flag_var_tracking_uninit = 0; + opts->x_flag_var_tracking_assignments = 0; } /* One could use EnabledBy, but it would lead to a circular dependency. */ diff --git a/gcc/testsuite/gcc.dg/pr108241.c b/gcc/testsuite/gcc.dg/pr108241.c new file mode 100644 index 00000000000..06d210fae68 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr108241.c @@ -0,0 +1,63 @@ +/* PR driver/108241 */ +/* { dg-options "-Os -frounding-math -fvar-tracking-assignments -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse" } */ + +long int n1; +int n2, n3, n4; +char n5; + +void +foo (long int x1, long int x2, int x3, int x4, int x5, char x6, char x7) +{ + char a01 = n2, a02 = x4, a03 = 0; + short int a04; + unsigned short int a05 = x5; + int a06, a07, a08 = a05, a09 = x3, a10 = 0; + long int a11, a12 = x4; + + if (x1) + { + a07 = x6 + (float)0x1000001; + a03 = a12 = a01 = a06 = ~0; + + if (x5) + a11 = n5; + } + else + { + a10 = x3 = n3; + if (n3) + a06 = a05 = x7; + } + + if (n3 < n5) + { + n4 = (x2 == x4) + !n1; + if (n4 % (n1 % x3)) + { + a04 = n4; + a02 = n2; + } + + if (x3) + { + a05 = !n1 % n2; + a08 = n1; + a04 = x5 + a06; + } + + if (a12) + a09 = n3 + n4; + + a12 = a07; + n3 = a11 % x1; + n5 += x6; + n1 = a04; + } + + n4 = x2 % x5 % a11; + a06 = a10 + a08 % a02 == n4; + a09 = a09 == a01 * x7; + n4 = x4; + a12 += x4 / 0xc000000000000000 + !a03; + a03 = !a05; +} diff --git a/gcc/testsuite/gcc.dg/pr79570.c b/gcc/testsuite/gcc.dg/pr79570.c index 00841b9487a..a15be9f201d 100644 --- a/gcc/testsuite/gcc.dg/pr79570.c +++ b/gcc/testsuite/gcc.dg/pr79570.c @@ -1,6 +1,6 @@ /* PR target/79570 */ /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments" } */ +/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments -g" } */ /* { dg-warning "changes selective scheduling" "" { target *-*-* } 0 } */ #include "pr69956.c"