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