From patchwork Tue May 9 09:00:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 91461 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2725941vqo; Tue, 9 May 2023 02:01:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+WCIMB8j+3tlOoZY4xxtzy9A+DVhhMusnBopH5WkNkkSxRgQ1P4F7aqxWM/jz7/bSNDDN X-Received: by 2002:a17:907:6d1f:b0:94f:5079:ade2 with SMTP id sa31-20020a1709076d1f00b0094f5079ade2mr12397694ejc.62.1683622880276; Tue, 09 May 2023 02:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683622880; cv=none; d=google.com; s=arc-20160816; b=0mbB9hvJvS0mLE8qdvhFHBrHxvmLlmUwqFG4C5Mgzh6OBBR/2+qBNlZxpy5S6N5CVC yXe1KoZESeZQ1xKUjEaVsza0RPhZyMw/3Wr1V3hUcIXR+smu7RSD96oo9ZYv4XSGR2yK 4R8cmxlD9+1AVz0sQFRKvNk+XXt2LpxUv0Oj6NmDCmJ2WbkBq+/9xrvgA9a3WRAaix/P dimVZWjHdt2DJZLBzr5ybW4gaEvQCeUM1XQFd4CyRFO1TBAoYnUuOKjcPOqrStx4jL7P 3XUe22jaKw0aEG6wFtRtTVOJXA4QY1w7kI6wy3u2gyUe87w7XXw0uz5Yo6xhR9UtFQF+ DQ/g== 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:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=VoeSTsYHfPvV830kpyutBM2C9vDBTas6A7uX3hRxn5c=; b=hNE2Qa30F2gzwkeVc/1MM5uVdVuAAkKvTqh7mnebGlsT7TnoEXx7rHpnMXKcUCBoV5 d1F1s03sxr6xfVubHM7vMsSjoYkAMLVxiosGpA8yyQCjbPU03wZ6zC74OBWvkWqwnC+u 1E11r37mocZVr6vt3Jov9Qg3GPgLpC9I7HsRgHUqAjT7rbt0GacX3NiliUC2jTd4vLf5 Actcgn64gsdfcEHLt3OtVmmPa54b3Zrb8AA7wU6WIwM9RQMiTC+ij3mK6v7wh2GIGoLT KJwbsO9QXPfB2TBEV2E9AVeABaaRRrDG8cUt2pHh1REuicHXzgr57Hb8XGEQK7T1hDni SP/g== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ku3-20020a170907788300b0094f9a88ec2esi1564663ejc.277.2023.05.09.02.01.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 02:01:20 -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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B6A5385773A for ; Tue, 9 May 2023 09:01:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 69F2D3858C53 for ; Tue, 9 May 2023 09:00:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69F2D3858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,261,1677571200"; d="scan'208,223";a="5276394" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 09 May 2023 01:00:48 -0800 IronPort-SDR: aZEas1IhGSLu/MsvpBkzjA9AduOlbGnrnbjbqskRdO17LRdIcWeSiv6rBCyJYrAqG05PXQx2RR CUzsJGod7uitNQZvjGYDiKrJp3wc0gkz2M5AgarNUpKZanX3Bz3l3A0EmD2/Xe7CKCA8mqbZtz lMIyhsr+PnQ+0y56ohWYrTdFHZaz2CELEj9RCg5CpIVK+2nfZcUei5XX36XiunQ7umbE19pnFm wwAQOducJU/jlPoa/wAmf5d+ZtuOhJYYFsXXd9P45VUx20UF99KtVLdwaPprZYf+fjaMRtDBoV +h4= From: Thomas Schwinge To: Christophe Lyon , CC: Richard Biener , Jan Hubicka , "Rainer Orth" , Mike Stump Subject: Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage (was: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS') In-Reply-To: References: <20110927172322.GA21068@kam.mff.cuni.cz> <875y99d5rt.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Tue, 9 May 2023 11:00:39 +0200 Message-ID: <87lehxswug.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, 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.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?1765406545689806603?= X-GMAIL-MSGID: =?utf-8?q?1765406545689806603?= Hi Christophe! On 2023-05-09T09:32:55+0200, Christophe Lyon wrote: > On Wed, 3 May 2023 at 13:47, Richard Biener via Gcc-patches wrote: >> On Wed, 3 May 2023, Thomas Schwinge wrote: >> > "Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS'"? > > This is causing issues on arm/aarch64, including: > > ERROR: can't read "LTO_TORTURE_OPTIONS": no such variable > in gcc.target/arm/acle/acle.exp: > > ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected > in gcc.target/aarch64/sls-mitigation/sls-mitigation.exp, > gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp, > gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp, > gcc.target/aarch64/torture/aarch64-torture.exp > > and maybe others > > Are other targets affected too? Sorry for that -- it means, the safe-guards I added are working as expected. Please test whether all these issues are gone with the attached "Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage"? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 5f158fb7a5167e943e1410c7faa30e682ae85c4d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 9 May 2023 10:35:27 +0200 Subject: [PATCH] Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage Recent commit d6654a4be3ba44c0d57be7c8a51d76d9721345e1 "Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS'" made it a requirement that 'LTO_TORTURE_OPTIONS' usage be within 'torture-init'/'torture-finish', and missed a few cases that didn't have that. gcc/testsuite/ * gcc.target/arm/acle/acle.exp: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage. * gcc.target/arm/cmse/cmse.exp: Likewise. * gcc.target/arm/pure-code/pure-code.exp: Likewise. --- gcc/testsuite/gcc.target/arm/acle/acle.exp | 3 +++ gcc/testsuite/gcc.target/arm/cmse/cmse.exp | 2 ++ gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/gcc/testsuite/gcc.target/arm/acle/acle.exp b/gcc/testsuite/gcc.target/arm/acle/acle.exp index 7b99dd72987..4d63ccc9554 100644 --- a/gcc/testsuite/gcc.target/arm/acle/acle.exp +++ b/gcc/testsuite/gcc.target/arm/acle/acle.exp @@ -26,6 +26,7 @@ load_lib gcc-dg.exp # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} set dg-do-what-default "assemble" @@ -48,5 +49,7 @@ gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ # Restore globals set dg-do-what-default ${saved-dg-do-what-default} set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} + # All done. +torture-finish dg-finish diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp index 1d251a4fa1f..0baf8c5a504 100644 --- a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp @@ -32,6 +32,7 @@ if ![info exists DEFAULT_CFLAGS] then { # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} @@ -104,4 +105,5 @@ set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} set dg-do-what-default ${saved-dg-do-what-default} # All done. +torture-finish dg-finish diff --git a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp index c23392dcdfd..6d32e4a7f8d 100644 --- a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp +++ b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp @@ -35,6 +35,7 @@ if ![info exists DEFAULT_CFLAGS] then { if {[check_effective_target_arm_cortex_m]} then { # Initialize `dg'. dg-init +torture-init set saved-dg-do-what-default ${dg-do-what-default} set dg-do-what-default "assemble" @@ -58,5 +59,6 @@ set dg-do-what-default ${saved-dg-do-what-default} set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} # All done. +torture-finish dg-finish } -- 2.34.1