Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / frexp.cpp
blob04fbaa9123954b469c392b94733209104c9913f3
1 // RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
3 #include <math.h>
4 #include <stdio.h>
5 #include <stdlib.h>
7 int main() {
8 for (int i = 0; i < 10000; i++) {
9 volatile double x = 10;
10 int exp = 0;
11 double y = frexp(x, &exp);
12 if (y != 0.625 || exp != 4) {
13 printf("i=%d y=%lf exp=%d\n", i, y, exp);
14 exit(1);
17 fprintf(stderr, "DONE\n");
18 // CHECK: DONE
19 return 0;