brintos

brintos / llvm-project-archived public Read only

0
0
Text · 549 B · 08a27b6 Raw
29 lines · c
1// RUN: %clang_builtins %s %librt -o %t && %run %t2// REQUIRES: librt_has_truncdfsf23 4#include <stdio.h>5 6#include "fp_test.h"7 8float __truncdfsf2(double a);9 10int test__truncdfsf2(double a)11{12    float actual = __truncdfsf2(a);13    float expected = a;14 15    if (actual != expected) {16        printf("error in test__truncdfsf2(%lf) = %f, "17               "expected %f\n", a, actual, expected);18        return 1;19    }20    return 0;21}22 23int main()24{25    if (test__truncdfsf2(340282366920938463463374607431768211456.0))26        return 1;27    return 0;28}29