This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR testsuite/70150: Check non-pic/ia32 in stackprotectexplicit2.C
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Mar 2016 06:43:41 -0700
- Subject: [PATCH] PR testsuite/70150: Check non-pic/ia32 in stackprotectexplicit2.C
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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