Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / Linux / globals-gc-sections-lld.cpp
blob06e7292e8dfca09a4cf63425048bca35e790b252
1 // RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0
2 // RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=1
4 // https://code.google.com/p/address-sanitizer/issues/detail?id=260
5 // REQUIRES: lld
6 int undefined();
8 // On i386 clang adds --export-dynamic when linking with ASan, which adds all
9 // non-hidden globals to GC roots.
10 __attribute__((visibility("hidden"))) int (*unused)() = undefined;
12 int main() {
13 return 0;