1 // Test that gc-sections-friendly instrumentation of globals does not introduce
2 // false negatives with the BFD linker.
3 // RUN: %clangxx_asan -fuse-ld=bfd -Wl,-gc-sections -ffunction-sections -fdata-sections -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
5 // Android does not use bfd.
6 // UNSUPPORTED: android
9 int main(int argc
, char **argv
) {
16 int res
= YYY
[argc
* 10]; // BOOOM
17 // CHECK: {{READ of size 1 at}}
18 // CHECK: {{located 0 bytes after global variable}}
19 res
+= XXX
[argc
] + ZZZ
[argc
];