From patchwork Tue Jan 23 11:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 1889671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=xry111.site header.i=@xry111.site header.a=rsa-sha256 header.s=default header.b=dE/wmN7d; dkim-atps=neutral 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=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TK4qX4QvPz1yPg for ; Tue, 23 Jan 2024 22:39:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6DAD63858426 for ; Tue, 23 Jan 2024 11:39:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id C245F3858038 for ; Tue, 23 Jan 2024 11:37:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C245F3858038 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C245F3858038 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706009863; cv=none; b=N9UK6rlHFg9FK4voazp0nWtiThxF5bUJw35/peT31bSFmv4MX2OtU6GG054BS/2/j+imb8/T4motPRICYm1uESWO32pUOCI23gtn97F6Y95u3FSOJyTdJRnvo8wF6aozVZDwRSMMTDI80Kf62Aak3Cs9MkKIa3z3dMF4GxKqeqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706009863; c=relaxed/simple; bh=RyVd5ApS81KqsUKjRSuDynOPfbhfw/9cMnpGDmCXAW0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=InZjliX3gl507PGlnHzqmFRHYMMVRVXST2p/XE3Y8/sLyDCt85mWWi5wL/TQC/O7AgdtwTg9i5amIMk1xJZr+dq1hVJ0sgQRyFD1tD+0ZszVQhA4MJVDpiu09TpgeqUACPKXcyPn9bkoff4aRSxNfXNkOjm6BFf/9Hgphyi8otI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1706009857; bh=RyVd5ApS81KqsUKjRSuDynOPfbhfw/9cMnpGDmCXAW0=; h=From:To:Cc:Subject:Date:From; b=dE/wmN7d2oXnxQhwsU5ClTcymG2SHwQEStoxKfQ5s7uNZ+1FbBReIE/832nkrp93u eciG4qrSHR4v2W+UahDbxwaku4pIJSgPQv8N2hPfVjkh+cUAlo8fjmU0guCFB27aMT 5mty8k/FkCP5UJrZSojmulSh9Yaf+M4xH6fUmWT4= Received: from stargazer.. (unknown [IPv6:2408:8471:1007:e81f:cd5c:87ba:f9ec:e5d1]) (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 9466066F1E; Tue, 23 Jan 2024 06:37:32 -0500 (EST) From: Xi Ruoyao To: gcc-patches@gcc.gnu.org Cc: chenglulu , i@xen0n.name, xuchenghua@loongson.cn, Xi Ruoyao Subject: [PATCH] LoongArch: testsuite: Disable stack protector for got-load.C Date: Tue, 23 Jan 2024 19:35:59 +0800 Message-ID: <20240123113723.39849-1-xry111@xry111.site> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, LIKELY_SPAM_FROM, 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+incoming=patchwork.ozlabs.org@gcc.gnu.org When building GCC with --enable-default-ssp, the stack protector is enabled for got-load.C, causing additional GOT loads for __stack_chk_guard. So mem/u will be matched more than 2 times and the test will fail. Disable stack protector to fix this issue. gcc/testsuite: * g++.target/loongarch/got-load.C (dg-options): Add -fno-stack-protector. --- Ok for trunk? gcc/testsuite/g++.target/loongarch/got-load.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.target/loongarch/got-load.C b/gcc/testsuite/g++.target/loongarch/got-load.C index 20924c73942..17870176ab4 100644 --- a/gcc/testsuite/g++.target/loongarch/got-load.C +++ b/gcc/testsuite/g++.target/loongarch/got-load.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mabi=lp64d -O2 -mexplicit-relocs -mcmodel=normal -fdump-rtl-expand" } */ +/* { dg-options "-mabi=lp64d -O2 -mexplicit-relocs -mcmodel=normal -fdump-rtl-expand -fno-stack-protector" } */ /* { dg-final { scan-rtl-dump-times "mem/u" 2 "expand" } } */ #include