1 // Test for the following situation:
2 // (1) global A is constructed.
3 // (2) exit() is called during construction of global B.
4 // (3) destructor of A reads uninitialized global C from another module.
5 // We do *not* want to report init-order bug in this case.
7 // RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
8 // RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s
18 ~A() { AccessC(); printf("PASSED\n"); }
19 // CHECK-NOT: AddressSanitizer