This test expects a single mention of stack_chk_fail, as part of a
call sequence, but when e.g. PIE is enabled by default, we output
.hidden stack_chk_fail_local, which makes for a count mismatch.
Disable PIC/PIE so as to not depend on the configurable default.
for gcc/testsuite/ChangeLog
* g++.dg/pr58245-1.C: Disable PIC/PIE.
}
/* { dg-final { scan-assembler-times "stack_chk_fail" 1 } } */
+
+/* When compiling for PI[EC], we issue a .hidden stack_chk_fail_local,
+ that causes the above to fail the expected match count. */
+/* { dg-additional-options "-fno-PIC" } */