Tested on x86_64-linux, darwin, pushed to trunk as obvious, thanks
Iain

--- 8< ---

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]>
---
 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 9caacbb21c7..b37df580b08 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" } }
-- 
2.50.1 (Apple Git-155)

Reply via email to