1// RUN: %clangxx_msan -O0 %s -o %t && %run %t
2
3// FIXME: Something changed in glibc 2.34, maybe earier.
4// UNSUPPORTED: glibc-2.34
5
6#include <sanitizer/msan_interface.h>
7
8volatile int global;
9static void pre_ctor() {
10 volatile int local;
11 global = 42;
12 local = 42;
13}
14
15__attribute__((section(".preinit_array"), used)) void(*__local_pre_ctor)(void) = pre_ctor;
16
17int main(void) {
18 return 0;
19}
20

source code of compiler-rt/test/msan/preinit_array.cpp