This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR testsuite/70150: Check non-pic/ia32 in stackprotectexplicit2.C


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]