From patchwork Sat Nov 25 03:15:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 169629 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1709873vqx; Fri, 24 Nov 2023 19:16:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7I0ggOgEqedu+/ZUYXTSTFMI2j2+uMe7kJ/mu86H/6cTXjvkSPOKZGRNtMwZ/Er0/Z1NH X-Received: by 2002:a05:620a:3b09:b0:77d:5d6d:3af with SMTP id tl9-20020a05620a3b0900b0077d5d6d03afmr4781116qkn.28.1700882167450; Fri, 24 Nov 2023 19:16:07 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1700882167; cv=pass; d=google.com; s=arc-20160816; b=i2VdBHJ433SSn7MpoRPPGl/f+nUOsdySAzbjn0eAE+hG5RwhfPokWlb/ydiUiMyJ57 lL6LqiSW1cIbVCOcAX10SWSNxXaHTyGKPLtYss9T485BpdQu8UgfboJCYqTabjoMvHT3 PHeZ0KRVy8drWlVAzT+JELlFWhvGVsw4a9rWv39UowmVCnYPtawM5uq8PYFhtD2ap8oU pE61oxo4u2ihVfT5VOAXOKkHXQCjm9VIG8u+xNcj6by8jVEwbJ6W1/LmLQPYPn0f2LuY kePhV9BNamiP/yuIaYvgjSb8gCA7pHXT2eVEGI+2IsE62M2z5F3ilEhMJVE6VaZOG7Iu iMRw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:date:message-id :content-transfer-encoding:mime-version:subject:cc:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=zgRlEh9gOFrHASZBptdegrFIYdjqGlUsApb8smxbpZk=; fh=ht5i32BtK6X4vWQnfmULWmTIRVRI55Yg6DnnHc/fXc0=; b=Fl+Rh2Ts+bYqZunT3mrfblt7JRwEyCX1byHwlcbf6CJC82ofuXk7sMBQZbGe/5iR4f Eo71qG1wMXehbqObKY8ZV6j9i6JIHU2fdq3YoJIFDEd380KD+6isSj/hSUq5jZFwkkNS ejczG6L+Q9qvpZnxwxobZz2kEYfDSjMwhB8NqUwuZFqoPoipQTjmoawQL/q6FKD/gV/e IqnvVVO8mKdMlXB6YwodY5BV//9KvEaaOcPzIffCr86U76JMA6aswC/zJ8m02o4Q16om MWla0b1VFko8Vd0FJctI55AanSTUTwfvphJv+ERBtWKlGclCKE4WuYXlv6s9qiH71SsC jIGQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@axis.com header.s=selector1 header.b=ivmqawVd; arc=pass (i=2); 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=axis.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id q5-20020a05620a024500b00777449886basi4568976qkn.572.2023.11.24.19.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 19:16:07 -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=@axis.com header.s=selector1 header.b=ivmqawVd; arc=pass (i=2); 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=axis.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3BA1638582AA for ; Sat, 25 Nov 2023 03:16:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2047.outbound.protection.outlook.com [40.107.6.47]) by sourceware.org (Postfix) with ESMTPS id 374F33858D32 for ; Sat, 25 Nov 2023 03:15:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 374F33858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 374F33858D32 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.6.47 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700882143; cv=pass; b=WfihSOW4MqNa+CT40TW09ni31/KrQXdV+z1Rl550yvBD1iiT1vOwLFB15RPaplXEQMh0DGDNAXJHELaqHv8Z/WezNg8RqRMAsdB7PqAn0+MSJoFAIpC81dQF2oKnf8VPHyJlYNdDG4x3/JWsou8ess/v6voJ8Nt9OKaC0uqoEJg= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700882143; c=relaxed/simple; bh=2eKB7xPVfUM0kMtYEpUoA1a7bhDeJGNaKO+VL0Zjvh0=; h=DKIM-Signature:From:To:Subject:MIME-Version:Message-ID:Date; b=QGFw/5aBkU0JsicvcNk4LmsjWkXmdHooPHjI5Cv8elQpmKkKRpb6bTQmPoqlZt/3qNFqsAHxdCuZRyGGUR2c3J70DoUZLyjX/0heALaWYSzEXqb7iVqDQkhdcSJTOJcz+pSqIsbwmQk+vfQYVMxVGifOszyO/hKRJVA6pEsYjSg= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MDntPwJfYlzW709c7cZTgtVQCzKPqRjKNQ1mAlHi/CifF/2a2c1D75Eohx4GYj8qZclWSg4foa4y0P4cbU6GF65hbiO3R38pEdFUuRWzCi+UKKvydfZVEr39sBuqBZtDoED3amO8WxiDmkVPMPEQRO+/sxjXbXuhuDm/QM70eANM3TBAURmfdmLaPjokH7XphIWbkqG+LCfBl1tun8QtxSNsUQInq/4PTjQRNtzWCJQ0+6PtEvAwQYFk6irtXuTrimx1OFzKshbCg3wwC158rAlyN/UmEbIEi3cJS5e6EDMmwBlbh02twkuP3EIn+OCUAs3EyXv1kdhH11ucAQJYkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zgRlEh9gOFrHASZBptdegrFIYdjqGlUsApb8smxbpZk=; b=hNteLBYF84yJ+85rtlIbfspO4tr2C4iWZhEK/8BTM7sFLewafqZSZqNfGDj9/LQM0VWZf0vOhnWHzArsu4LNkhoDWWJv7kDRq1Q3ZvXoD/W2v+fMyiRL9EZNJvTSGpuBOe3w9ZfF3oG/GZcrHm3R2OH5EcJLe6o71QvD/tRxh+w1EkA6yyrUrXRUWxPdqveLOdUSsOZuExtRXJiYS5JGz5s2GFF1txNEdGzqbgSqjSKVfdDgpmS5xBCsQsfkHhsy8kYl0TsUiF2tD97Q7oE6vGUZACqVbx7NQ1t/NLgi8EXNsDqx3JVdZKN4a0iCQ0J0iGCvJ2JkeQQNhM3RivHI8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zgRlEh9gOFrHASZBptdegrFIYdjqGlUsApb8smxbpZk=; b=ivmqawVd/oZemSrGUMtPEFjKDxVQiePZwQ70kqaVoZAhXNSf2Dc+49YJvSQWhEG5t6d2BUUeLLeqCW6IE/5VSxy57UMcsdBsAvEd4lxoDMFaHAOZD4kXsYr0mO9PHiYa+pATg2UAcYqFbxLaJdmP0BdWLquZTjTqScGYnqFBhmw= Received: from AM5PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:206:1::18) by VI0PR02MB10928.eurprd02.prod.outlook.com (2603:10a6:800:211::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.21; Sat, 25 Nov 2023 03:15:38 +0000 Received: from AM3PEPF0000A796.eurprd04.prod.outlook.com (2603:10a6:206:1:cafe::68) by AM5PR04CA0005.outlook.office365.com (2603:10a6:206:1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.21 via Frontend Transport; Sat, 25 Nov 2023 03:15:37 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM3PEPF0000A796.mail.protection.outlook.com (10.167.16.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7046.17 via Frontend Transport; Sat, 25 Nov 2023 03:15:37 +0000 Received: from se-mail01w.axis.com (10.20.40.7) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 25 Nov 2023 04:15:37 +0100 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Sat, 25 Nov 2023 04:15:37 +0100 Received: from pchp3.se.axis.com (pchp3.se.axis.com [10.88.21.53]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id DB185E913; Sat, 25 Nov 2023 04:15:36 +0100 (CET) Received: by pchp3.se.axis.com (Postfix, from userid 171) id DA3EE2042A; Sat, 25 Nov 2023 04:15:36 +0100 (CET) From: Hans-Peter Nilsson To: CC: Subject: [PATCH] testsuite/gcc.dg/uninit-pred-9_b.c:20: Fix XPASS for various targets MIME-Version: 1.0 Message-ID: <20231125031536.DA3EE2042A@pchp3.se.axis.com> Date: Sat, 25 Nov 2023 04:15:36 +0100 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM3PEPF0000A796:EE_|VI0PR02MB10928:EE_ X-MS-Office365-Filtering-Correlation-Id: c9669c2d-2e6b-4ecb-e5a9-08dbed64cbad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m6OAbNgqBg9rVQDF1sVW6ilpj4dbx0lg1tPe+k01mcPFO8YMdI0nwQsgEXj9xDWhfEV3n/XyklugUDw1qe7Qz6bzpT1/u5722sEflaJh6MFeUpT9BmLhvckfo/PQPT/He0d29KZvcVd9FfkpDq036A9+zU9OVPP+ozvyqMSz0uUkhCiT85UDx5sLfT7bsjlxRQtaEZGM1DM1vu7kmxHX5dfy1/eFFSLiSy/0JarFxUpQxuVDaLV5/uv9F4tEC5tR/1Yqlqbtm5MqguWmBqwSVFLTWXWJ2uKi4KW7rm9p+plNmDwVau4avAhLwR3KnC7r2JABQaGDeaBZDxv7ivZw0JzSO11bo/QV65FHuC5JMlQN6emJEsj1CeX9Ilm8d/74lx4pJQXP5AIVvso/dhvW+XtPH8mIDJmiq15kqF599flfFH5k5PhKlVcaEjvSktyj0JcLZBNLdeGzgAkob0nT6iJoZ6xStSOQPamFOCDJUKRicZSeiENtHM2UFAj9fx2QVvt/1LeM0Qt/+AIC4sPuDD7Njd3DZOSI6KqmNbtXBDzDHWAWrLs5uJmQc1y2kl+e9E76jc9au8hKDPkAxOAPiyoruBkuPdvMz/worxBdlQsW++dyoEWFf5sKoQmpBldkNYoLtdK19kXUIP5oXQE3xnrPFE6Zed3CvqkY/y57WhVn2YktRF0DYtabTwj4aQQhijnGFY8zD696/3s81NLlgmukIuMFBWwE4r1HKJTYfMtTE+Lvyi7Zae5YB1VNh2JzeH35lGLib09m1GHrBYFsb6XMljbVmKhpeo6o7qZkbPnhw8sVmF4hj5HyeiGpeme4 X-Forefront-Antispam-Report: CIP:195.60.68.100; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.axis.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(346002)(376002)(136003)(396003)(230273577357003)(230173577357003)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(82310400011)(36840700001)(46966006)(40470700004)(42186006)(81166007)(70206006)(70586007)(83380400001)(478600001)(1076003)(40480700001)(84970400001)(82740400003)(47076005)(316002)(6916009)(356005)(8936002)(36860700001)(8676002)(4326008)(6266002)(426003)(336012)(26005)(5660300002)(2906002)(33656002)(41300700001)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2023 03:15:37.2428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9669c2d-2e6b-4ecb-e5a9-08dbed64cbad X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af; Ip=[195.60.68.100]; Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A796.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR02MB10928 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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.30 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783504219648519711 X-GMAIL-MSGID: 1783504219648519711 While looking at the various targets, I found that the m32r target has two options implemented as opposites: -mbranch-cost=1 and -mbranch-cost=2, that have a bug that makes them yield their functionally opposite effect; i.e. -mbranch-cost=$arg, arg={1, 2} yields BRANCH_COST(x, y) 3-$arg. Anyway, the default is 1, unknown if that's deliberate. (I won't add a PR, just CC:ing the maintainer.) Tested for XPASSing targets: m32r-elf and cris-elf XFAILing targets: loongarch64-unknown-linux-gnuf64 and ia64-linux. Ok to commit? -- >8 -- The xfail for "*-*-*" here, set in r14-4089-gd45ddc2c04e471 "tree-optimization/111294 - backwards threader PHI costing" was somewhat too general and made this test XPASS for a number of targets. The common factor for those targets is that they either explicitly or by default define LOGICAL_OP_NON_SHORT_CIRCUIT as 0 (see fold-const.cc). Instead of changing *-*-* to a seemingly random set of xfailed targets or inventing a new testsuite effective-target predicate for logical-op-short-circuited targets or the opposite, let's just force a setting that removes the need for the xfail for all targets, by overriding with --param=logical-op-non-short-circuit=0. * gcc.dg/uninit-pred-9_b.c: Remove xfail for line 20. Pass --param=logical-op-non-short-circuit=0. Comment why. --- gcc/testsuite/gcc.dg/uninit-pred-9_b.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c index 3e544f3f1be4..1877d5d45d6c 100644 --- a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c +++ b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-Wuninitialized -O2" } */ +/* The param shuts up a bogus uninitialized warning at line 21. */ +/* { dg-options "-Wuninitialized -O2 --param=logical-op-non-short-circuit=0" } */ int g; void bar(); @@ -17,7 +18,7 @@ int foo (int n, int l, int m, int r) if (l > 100) if ( (n <= 9) && (m < 100) && (r < 19) ) - blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail *-*-* } } */ + blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */ if ( (n <= 8) && (m < 99) && (r < 19) ) blah(v); /* { dg-bogus "uninitialized" "pr101674" } */