From patchwork Wed Mar 1 18:07:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 1750178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=P75kKpvH; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PRj3n27k8z240n for ; Thu, 2 Mar 2023 05:11:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 412F0384F49F for ; Wed, 1 Mar 2023 18:11:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 412F0384F49F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677694291; bh=fNYIe43zBZUN26hw0fawcD9MI8NXz+qiixouQRv+tHk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=P75kKpvHCvaSk00zBlYr4Wrdb8nOUG5HIpCE03b8tFcT1c/+xbBT9ugs9OrAmE2KY vfjebBUyNDFN5Js10UduujV2G4Y+xUYm+nQ/ZfII6h7wy+VGCRzYScSpwr/quyW5iy OEJiIHihW0fSUcmX28eP9nXrP6PfHBEq5dLVtDEU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 5B045385B533 for ; Wed, 1 Mar 2023 18:08:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B045385B533 Received: from stargazer.. (unknown [IPv6:240e:358:113f:d600:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 7B79E65DC8; Wed, 1 Mar 2023 13:07:58 -0500 (EST) To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Xi Ruoyao Subject: [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset Date: Thu, 2 Mar 2023 02:07:20 +0800 Message-Id: <20230301180720.26514-9-xry111@xry111.site> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230301180720.26514-1-xry111@xry111.site> References: <20230301180720.26514-1-xry111@xry111.site> MIME-Version: 1.0 X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, LIKELY_SPAM_FROM, SPF_HELO_PASS, 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: , X-Patchwork-Original-From: Xi Ruoyao via Gcc-patches From: Xi Ruoyao Reply-To: Xi Ruoyao Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Stack protector needs a guard value on the stack and change the stack layout. So we need to disable it for those tests, to avoid test failure with --enable-default-ssp. gcc/testsuite/ChangeLog: * gcc.target/aarch64/shrink_wrap_1.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/stack-check-cfa-1.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/stack-check-cfa-2.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/test_frame_17.c (dg-options): Add -fno-stack-protector. --- gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c | 2 +- gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c | 2 +- gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c | 2 +- gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c index ab7cd74ec3b..067220c04a0 100644 --- a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c +++ b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { aarch64*-*-* } } } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-stack-protector" } */ /* { dg-final { check-function-bodies "**" "" } } */ /* diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c index 6885894a97e..412a9ed1aab 100644 --- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c +++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */ +/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ #define SIZE 128*1024 diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c index 5796a53be06..e440569a078 100644 --- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c +++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */ +/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ #define SIZE 1280*1024 + 512 diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c index 44f13291128..5d432ad0854 100644 --- a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c +++ b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-stack-protector" } */ /* Test reuse of stack adjustment temporaries. */