testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-*
authorXi Ruoyao <xry111@mengyan1223.wang>
Tue, 22 Jun 2021 06:57:47 +0000 (14:57 +0800)
committerXi Ruoyao <xry111@mengyan1223.wang>
Fri, 25 Jun 2021 02:31:31 +0000 (10:31 +0800)
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.

gcc/testsuite/g++.dg/no-stack-protector-attr-3.C

index 56a4e74..76a5ec0 100644 (file)
@@ -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*-*-* } } } }*/