[gcc r17-3382] testsuite, fortran: Use generic tests for hidden directives.
Iain D Sandoe via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:b9d0443dd81d7b3cde7e8e25bef223cac12b1348 commit r17-3382-gb9d0443dd81d7b3cde7e8e25bef223cac12b1348 Author: Iain Sandoe <[email protected]> Date: Tue Aug 18 15:34:11 2026 +0100 testsuite, fortran: Use generic tests for hidden directives. Since the representation of visibility "hidden" varies between object formats (e.g. ELF, Mach-O, COFF), we have some generic asm checkers for hidden. Without those (1) test-not cases pass vacuously and (2) test for presence fails on every object format but the one committed. In the case of bind_c_private_1.f90, an ELF version was committed and so the test fails everywhere on Darwin. Fixed by using the generic matchers for hidden/not-hidden symbols. gcc/testsuite/ChangeLog: * gfortran.dg/bind_c_private_1.f90: Use generic asm matchers for hidden symbols. Signed-off-by: Iain Sandoe <[email protected]> Diff: --- gcc/testsuite/gfortran.dg/bind_c_private_1.f90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/bind_c_private_1.f90 b/gcc/testsuite/gfortran.dg/bind_c_private_1.f90 index 9caacbb21c7d..b37df580b086 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_private_1.f90 +++ b/gcc/testsuite/gfortran.dg/bind_c_private_1.f90 @@ -23,8 +23,8 @@ contains end subroutine plain_sub end module m -! { dg-final { scan-assembler-not "\\.hidden\[ \t\]+bc_var" } } -! { dg-final { scan-assembler-not "\\.hidden\[ \t\]+bc_named" } } -! { dg-final { scan-assembler-not "\\.hidden\[ \t\]+bc_unnamed" } } -! { dg-final { scan-assembler "\\.hidden\[ \t\]+__m_MOD_plain_var" } } -! { dg-final { scan-assembler "\\.hidden\[ \t\]+__m_MOD_plain_sub" } } +! { dg-final { scan-not-hidden "bc_var" } } +! { dg-final { scan-not-hidden "bc_named" } } +! { dg-final { scan-not-hidden "bc_unnamed" } } +! { dg-final { scan-hidden "__m_MOD_plain_var" } } +! { dg-final { scan-hidden "__m_MOD_plain_sub" } }