]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: force PIC/PIE off for pr58245-1.C
authorAlexandre Oliva <oliva@adacore.com>
Thu, 9 Nov 2023 03:01:32 +0000 (00:01 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 9 Nov 2023 03:01:32 +0000 (00:01 -0300)
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.

gcc/testsuite/g++.dg/pr58245-1.C

index 1439bc62e710e214e4eb4391913169883b445f8c..71d4736ddf610e3dd0e8d73d0ec81c6cc3949b59 100644 (file)
@@ -8,3 +8,7 @@ bar (void)
 }
 
 /* { 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" } */