1 // RUN: %clangxx_asan %min_macos_deployment_target=10.11 -O0 %s %p/Helpers/initialization-bug-extra.cpp -o %t
2 // RUN: %env_asan_opts=check_initialization_order=true:strict_init_order=true not %run %t 2>&1 | FileCheck %s
4 // Do not test with optimization -- the error may be optimized away.
6 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=186
7 // XFAIL: target={{.*windows-msvc.*}}
9 // Fails on some Darwin bots, probably iOS.
16 void __attribute__((constructor
)) ctor() {
18 // CHECK: AddressSanitizer: initialization-order-fiasco
22 // ASan should have caused an exit before main runs.