aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2023-11-09 00:01:32 -0300
committerAlexandre Oliva <oliva@gnu.org>2023-11-09 00:01:32 -0300
commit5057ee07ccc918a32b9c36855a8c1f74e0b39b04 (patch)
treea074b6afde0f1d6a4a4e7247dc82dffa2bd0fc00
parent61d2b4746300a604469df15789194d0a7c73791b (diff)
downloadgcc-5057ee07ccc918a32b9c36855a8c1f74e0b39b04.zip
gcc-5057ee07ccc918a32b9c36855a8c1f74e0b39b04.tar.gz
gcc-5057ee07ccc918a32b9c36855a8c1f74e0b39b04.tar.bz2
testsuite: force PIC/PIE off for pr58245-1.C
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.
-rw-r--r--gcc/testsuite/g++.dg/pr58245-1.C4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/pr58245-1.C b/gcc/testsuite/g++.dg/pr58245-1.C
index 1439bc6..71d4736 100644
--- a/gcc/testsuite/g++.dg/pr58245-1.C
+++ b/gcc/testsuite/g++.dg/pr58245-1.C
@@ -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" } */