diff mbox series

[resend] testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-*

Message ID 599bd4193509b04dabffd156b8ae3387e2b769b7.camel@mengyan1223.wang
State New
Headers show
Series [resend] testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-* | expand

Commit Message

Li, Pan2 via Gcc-patches June 22, 2021, 9:44 a.m. UTC
[Resend because the original subject missed "[PATCH]" and the path in
ChangeLog is wrong.]

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(-)

Comments

Jeff Law June 24, 2021, 6:05 a.m. UTC | #1
On 6/22/2021 3:44 AM, Xi Ruoyao via Gcc-patches wrote:
> [Resend because the original subject missed "[PATCH]" and the path in
> ChangeLog is wrong.]
>
> 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.
OK.  Seems like a good patch for you to test your commit privs with once 
the infrastructure overseers have set up your account

Jeff
Xi Ruoyao June 25, 2021, 2:53 a.m. UTC | #2
On Thu, 2021-06-24 at 00:05 -0600, Jeff Law wrote:
> 
> 
> On 6/22/2021 3:44 AM, Xi Ruoyao via Gcc-patches wrote:
> > [Resend because the original subject missed "[PATCH]" and the path
> > in
> > ChangeLog is wrong.]
> > 
> > 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.
> OK.  Seems like a good patch for you to test your commit privs with
> once 
> the infrastructure overseers have set up your account
> 
> Jeff
> 

Pushed into trunk as 607c558804f7.
diff mbox series

Patch

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 56a4e74da50..76a5ec08681 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*-*-* } } } }*/