From be4fdad0b0917e2d56328702a555353c5f104fd8 Mon Sep 17 00:00:00 2001 From: stilscher <66023521+stilscher@users.noreply.github.com> Date: Thu, 23 Nov 2023 14:51:59 +0100 Subject: [PATCH] add regression test for sin --- .../39-signed-overflows/12-sin-noninf-nonnan.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/regression/39-signed-overflows/12-sin-noninf-nonnan.c diff --git a/tests/regression/39-signed-overflows/12-sin-noninf-nonnan.c b/tests/regression/39-signed-overflows/12-sin-noninf-nonnan.c new file mode 100644 index 0000000000..30a5f762be --- /dev/null +++ b/tests/regression/39-signed-overflows/12-sin-noninf-nonnan.c @@ -0,0 +1,15 @@ +// PARAM: --enable ana.float.interval --set ana.activated[+] tmpSpecial + +#include + +int main() /* check_lower_bound */ +{ + float x; + + if(!(!__builtin_isnan (x) && !__builtin_isinf_sign (x))) abort(); + float y = sinf(x); + if(!(__builtin_isgreaterequal(y, -1.0f))) + __goblint_check(0); // NOWARN (unreachable) + return 0; + +}