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