Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / PR52382.c
blob5a466839395973b4da9a391cbb5dea55631b6242
1 // RUN: %clang_asan -O0 %s -o %t -w && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clang_asan -O2 %s -o %t -w && not %run %t 2>&1 | FileCheck %s
4 int global_array[100] = {-1};
6 // This access is 412 bytes after the start of the global: past the end of the
7 // uninstrumented array, but within the bounds of the extended instrumented
8 // array. We should ensure this is still instrumented.
9 int main(void) { return global_array[103]; }
11 // CHECK: AddressSanitizer: global-buffer-overflow on address
12 // CHECK: is located 12 bytes after global variable 'global_array'