Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / frexpl_interceptor.cpp
blob721eecc6f82a35b70a06f3227283e6c0d34c633d
1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // Test the frexpl() interceptor.
5 // FIXME: MinGW-w64 implements `frexpl()` as a static import, so the dynamic
6 // interceptor seems to not work.
7 // XFAIL: target={{.*-windows-gnu}}
9 #include <math.h>
10 #include <stdio.h>
11 #include <stdlib.h>
12 int main() {
13 long double x = 3.14;
14 int *exp = (int *)malloc(sizeof(int));
15 free(exp);
16 double y = frexpl(x, exp);
17 // CHECK: use-after-free
18 // CHECK: SUMMARY
19 return 0;