Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / global-address.cpp
blob81f0230b733f55bf844550255ca836832e01590c
1 // RUN: %clangxx_asan -o %t %s
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 #include <sanitizer/allocator_interface.h>
5 int g_i = 42;
6 int main() {
7 // CHECK: AddressSanitizer: attempting to call __sanitizer_get_allocated_size() for pointer which is not owned
8 // CHECK-NOT: AddressSanitizer:DEADLYSIGNAL
9 // CHECK: SUMMARY: AddressSanitizer: bad-__sanitizer_get_allocated_size
10 // CHECK-NOT: AddressSanitizer:DEADLYSIGNAL
11 return (int)__sanitizer_get_allocated_size(&g_i);