]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: testsuite: Disable stack protector for got-load.C
authorXi Ruoyao <xry111@xry111.site>
Tue, 23 Jan 2024 11:32:38 +0000 (19:32 +0800)
committerXi Ruoyao <xry111@xry111.site>
Tue, 23 Jan 2024 15:44:26 +0000 (23:44 +0800)
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.

gcc/testsuite/g++.target/loongarch/got-load.C

index 20924c73942281545ec4c6acda62ffa6b1e97d75..17870176ab48d862b8332c53359a80601e97043f 100644 (file)
@@ -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 <bits/stdc++.h>