For ia32, __stack_chk_fail isn't called in PIC.  We need to check
non-pic or non-ia32 before scanning for __stack_chk_fail.

OK for trunk?

H.J.
---
        PR testsuite/70150
        * g++.dg/stackprotectexplicit2.C: Scanning for __stack_chk_fail
        only for non-pic or non-ia32 .
---
 gcc/testsuite/g++.dg/stackprotectexplicit2.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/stackprotectexplicit2.C 
b/gcc/testsuite/g++.dg/stackprotectexplicit2.C
index 9cf9ab9..e30b4b3 100644
--- a/gcc/testsuite/g++.dg/stackprotectexplicit2.C
+++ b/gcc/testsuite/g++.dg/stackprotectexplicit2.C
@@ -24,4 +24,4 @@ int __attribute__((stack_protect)) c()
 }
 
 
-/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */
\ No newline at end of file
+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 { target { nonpic || { 
! ia32 } } } } } */
-- 
2.5.0

Reply via email to