From: Xi Ruoyao Date: Tue, 23 Jan 2024 11:32:38 +0000 (+0800) Subject: LoongArch: testsuite: Disable stack protector for got-load.C X-Git-Tag: basepoints/gcc-15~1774 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46f3ba56c47f002153d23334348dadea206dae79;p=thirdparty%2Fgcc.git LoongArch: testsuite: Disable stack protector for got-load.C 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. --- diff --git a/gcc/testsuite/g++.target/loongarch/got-load.C b/gcc/testsuite/g++.target/loongarch/got-load.C index 20924c739422..17870176ab48 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