From 607c558804f70af2b8f0c39d4d349b349d56cc84 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 22 Jun 2021 14:57:47 +0800 Subject: [PATCH] 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. --- gcc/testsuite/g++.dg/no-stack-protector-attr-3.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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*-*-* } } } }*/ -- 2.7.4