From patchwork Mon Dec 11 08:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 176534 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6906246vqy; Mon, 11 Dec 2023 00:41:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8x0TnvIN1wtLiG0AO3je8yV9nJFeJAxsNzA4sdUCgg/jhl+DKf0iICWGmBT8NC6o9mwDi X-Received: by 2002:a05:622a:148f:b0:423:769e:d403 with SMTP id t15-20020a05622a148f00b00423769ed403mr6835666qtx.39.1702284063346; Mon, 11 Dec 2023 00:41:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702284063; cv=pass; d=google.com; s=arc-20160816; b=0CHvH7nPAAbKV+krsvjQxMa2GTgc49BdLbKZK0QrFbe53dNTWPUfAcU92UPjcTeB3d mWWjeAvNOd7nhF9UmyY12Kobo4UPxBLJz1kBc1q0up6nlCzbb0lr8/3y29pJn/Q/vLSa 8mTmvtzV3zuDdHsrkFCgyF4esPTFLgQpa0z9JMrTVmJW3J/D4nsngiH+bI74oMnCtP5q ijmBoDYgTt3/1y0WCpqhUFoy8eaym2AVZMYS1Czw4V7o1QRH3nAfCqUy8sxbYRaLR7S8 U/76dc+/Jrop7tZu7hRMaSgoSGmSzDDRaUExMUoHlQlmCwT6xiYSpBsIacyTYDlAAo/C WPhg== 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:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=0mrb+qfJtrQCPaLZtZJ8CGnf9tIyRKfsfzp9D5ZXl/Q=; fh=TzwmNZ0Y1lERnRLTMYMokyfE1trpf0pUzyFdns3zHJ8=; b=D88UkO/TxSWNoGPv0WtHbyKjBtC6xWf/LiqFotV+jnUDcqPu6hZJE63j/QXk2r2qA6 5S8Wxd8jaAsCI0EjDtsYcW35CgoqTyo4CwHI+vJkX6I3Ty5/kGpPW7DrvKqzAQTzRl0a rffWLBHGYYKLF2gBaVA9epf9MNaCPMy8FTJkDgoTgOEmd3iqZojHp4GZnRlmRYR2cZMK x91JrpFVrmyBZuDIRIuVWXxrHhvBooFpU6SQEwAsNnt5qolofc8PT2XTaRsZBTUJWIpy IFibX0Q3jvNBRv+Ljx2bfBIar10j7+XNbhgnxqNZ/W13zKeHukr2MLHeeXaPrfqL2NXl yn8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iuSmldl2; 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 fz6-20020a05622a5a8600b0042578b77421si8225990qtb.550.2023.12.11.00.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:41:03 -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=iuSmldl2; 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 228523858C2A for ; Mon, 11 Dec 2023 08:41:03 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id C161A385842C for ; Mon, 11 Dec 2023 08:40:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C161A385842C 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 C161A385842C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702284031; cv=none; b=xn7WhcXC7Sso91HyRUT1xrZQAdYXf9Uy5lqLEUHfq9RYpiPbF9d/5c1PdPAAyxXvNnzl/ijVSvwfrJB19Igxf+wjccM0rspWLlIlVlBejCYrqO51vFeyA6nylV8lUjPx0IC4tv/OhgaQJZBXJzZ5mx6txA6oUCFg9xMq/jcc8R4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702284031; c=relaxed/simple; bh=sDKy/IJ/JXXlj3Ju8IJTOV3pqtqRClOWmwgcbR1LDJo=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=vT0cXhzT77daYf8q5hAhNP4AiSz6xo5qcbfFM68ePixeUG5iQRq2SjgGpq8LDizmOrrzljCOb5j1258ZuLSKmx0/ME8xxxz/jjRWCg9ZUPJy4z1f4dcFWki8jZsYnJwkg1MknXPklszHOfdnR5jLJ1bRlymjeEOrvvhE4quPIxI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702284028; 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:in-reply-to:in-reply-to: references:references; bh=0mrb+qfJtrQCPaLZtZJ8CGnf9tIyRKfsfzp9D5ZXl/Q=; b=iuSmldl2p3ofsx0Sl5WKitaPquct/IbPpdmul8kedUO1efgphxBccuC/y00QrFXYxxoMN5 XzZEWDnIYg3yCcIbwPX5oo4tGWR+qSsg8URM1giFZvYXg6Q9ef9rN/swkS/dGVHqpuZs// VJJv7eU8DeZJaw7MAKDiwhjO3nDZawk= 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-53-uSugzhtMPnC1HFd72a9Jhw-1; Mon, 11 Dec 2023 03:40:23 -0500 X-MC-Unique: uSugzhtMPnC1HFd72a9Jhw-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 3CF5587A389; Mon, 11 Dec 2023 08:40:23 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F16A440C6EB9; Mon, 11 Dec 2023 08:40:22 +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 3BB8eKDv2371872 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 09:40:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3BB8eJNt2371851; Mon, 11 Dec 2023 09:40:19 +0100 Date: Mon, 11 Dec 2023 09:40:18 +0100 From: Jakub Jelinek To: Richard Biener , Alexandre Oliva Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Disable -fstack-protector* for some strub tests Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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_H4, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784974214380013840 X-GMAIL-MSGID: 1784974214380013840 Hi! In our distro builds, we test with RUNTESTFLAGS='--target_board=unix\{,-fstack-protector-strong\}' because SSP is something we use widely in the distribution. 4 new strub test FAIL with that option though, as can be seen with a simple make check-gcc check-g++ RUNTESTFLAGS='--target_board=unix\{,-fstack-protector-strong\} dg.exp=strub-O*' - in particular, the expand dump \[(\]call\[^\n\]*strub_leave.*\n\[(\]code_label regexps see code_labels in there introduced for stack protector. The following patch fixes it by using -fno-stack-protector for these explicitly. Tested on x86_64-linux, ok for trunk? 2023-12-11 Jakub Jelinek * c-c++-common/strub-O2fni.c: Add -fno-stack-protector to dg-options. * c-c++-common/strub-O3fni.c: Likewise. * c-c++-common/strub-Os.c: Likewise. * c-c++-common/strub-Og.c: Likewise. Jakub --- gcc/testsuite/c-c++-common/strub-O2fni.c.jj 2023-12-08 08:28:23.689170380 +0100 +++ gcc/testsuite/c-c++-common/strub-O2fni.c 2023-12-11 09:25:49.100792709 +0100 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fstrub=strict -fdump-rtl-expand -fno-inline" } */ +/* { dg-options "-O2 -fstrub=strict -fdump-rtl-expand -fno-inline -fno-stack-protector" } */ /* { dg-require-effective-target strub } */ /* With -fno-inline, none of the strub builtins are inlined. */ --- gcc/testsuite/c-c++-common/strub-O3fni.c.jj 2023-12-08 08:28:23.707170125 +0100 +++ gcc/testsuite/c-c++-common/strub-O3fni.c 2023-12-11 09:25:56.388695362 +0100 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fstrub=strict -fdump-rtl-expand -fno-inline" } */ +/* { dg-options "-O3 -fstrub=strict -fdump-rtl-expand -fno-inline -fno-stack-protector" } */ /* { dg-require-effective-target strub } */ /* With -fno-inline, none of the strub builtins are inlined. */ --- gcc/testsuite/c-c++-common/strub-Os.c.jj 2023-12-08 08:28:23.707170125 +0100 +++ gcc/testsuite/c-c++-common/strub-Os.c 2023-12-11 09:26:24.994313267 +0100 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Os -fstrub=strict -fdump-rtl-expand" } */ +/* { dg-options "-Os -fstrub=strict -fdump-rtl-expand -fno-stack-protector" } */ /* { dg-require-effective-target strub } */ /* At -Os, without -fno-inline, we fully expand enter, and also update. The --- gcc/testsuite/c-c++-common/strub-Og.c.jj 2023-12-08 08:28:23.707170125 +0100 +++ gcc/testsuite/c-c++-common/strub-Og.c 2023-12-11 09:26:07.077552587 +0100 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Og -fstrub=strict -fdump-rtl-expand" } */ +/* { dg-options "-Og -fstrub=strict -fdump-rtl-expand -fno-stack-protector" } */ /* { dg-require-effective-target strub } */ /* At -Og, without -fno-inline, we fully expand enter, but neither update nor