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.
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 35d9e886ccf..cd34e4c7cfd 100644 --- a/gcc/testsuite/g++.dg/stackprotectexplicit2.C +++ b/gcc/testsuite/g++.dg/stackprotectexplicit2.C @@ -25,4 +25,4 @@ int __attribute__((stack_protect)) c() } -/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */ +/* { dg-final { scan-assembler-times "stack_chk_fail" 2 { target { nonpic || { ! ia32 } } } } } */ -- 2.17.1