Hi,

This patch adjusts the test for the D std library so that it doesn't
incorrectly return true on targets --with-libphobos-druntime-only=yes.

The function cos() is treated as an intrinsic, so always exists.

Regtested with --enable-libphobos --with-libphobos-druntime-only=yes.

Committed to mainline.

Regards,
Iain.

---
gcc/testsuite/ChangeLog:

        * lib/target-supports.exp
        (check_effective_target_d_runtime_has_std_library): Test for
        acos rather than cos.
---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 855bdbcf55a..64555922ac9 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11056,7 +11056,7 @@ proc check_effective_target_d_runtime_has_std_library { 
} {
 
        extern(C) int main() {
            import std.math;
-           real function(real) pcos = &cos;
+           real function(real) pcos = &acos;
            return 0;
        }
     }]
-- 
2.43.0

Reply via email to