aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-06-22 14:57:47 +0800
committerXi Ruoyao <xry111@mengyan1223.wang>2021-06-25 10:31:31 +0800
commit607c558804f70af2b8f0c39d4d349b349d56cc84 (patch)
treed8d00355f686639df35c9195f959c359c13ed340
parente9e2bad7251477db92ab9ebcdc010f9282dd9890 (diff)
downloadgcc-607c558804f70af2b8f0c39d4d349b349d56cc84.zip
gcc-607c558804f70af2b8f0c39d4d349b349d56cc84.tar.gz
gcc-607c558804f70af2b8f0c39d4d349b349d56cc84.tar.bz2
testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-*
On MIPS a call to __stack_chk_fail needs an additional .reloc pseudo-op, so "stack_chk_fail" will appear two times. gcc/testsuite/ * g++.dg/no-stack-protector-attr-3.C (dg-final): Adjust for MIPS.
-rw-r--r--gcc/testsuite/g++.dg/no-stack-protector-attr-3.C3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/no-stack-protector-attr-3.C b/gcc/testsuite/g++.dg/no-stack-protector-attr-3.C
index 56a4e74..76a5ec0 100644
--- a/gcc/testsuite/g++.dg/no-stack-protector-attr-3.C
+++ b/gcc/testsuite/g++.dg/no-stack-protector-attr-3.C
@@ -20,4 +20,5 @@ int __attribute__((stack_protect)) bar()
return 0;
}
-/* { dg-final { scan-assembler-times "stack_chk_fail" 1 } } */
+/* { dg-final { scan-assembler-times "stack_chk_fail" 1 { target { ! mips*-*-* } } } }*/
+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 { target { mips*-*-* } } } }*/