From: Alexandre Oliva Date: Thu, 9 Nov 2023 03:01:32 +0000 (-0300) Subject: testsuite: force PIC/PIE off for pr58245-1.C X-Git-Tag: basepoints/gcc-15~4881 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5057ee07ccc918a32b9c36855a8c1f74e0b39b04;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/testsuite/g++.dg/pr58245-1.C b/gcc/testsuite/g++.dg/pr58245-1.C index 1439bc62e710..71d4736ddf61 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" } */