1 // Check that -asan-use-private-alias silence the false
2 // positive ODR violation on Darwin with LTO.
6 // RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias
7 // RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias
8 // RUN: %clangxx_asan_lto %t-1.o %t-2.o -o %t -flto
9 // RUN: %run %t 2>&1 | FileCheck %s
17 static const char *my_global
= "test\n\00abc";
21 fputs(my_global
, stderr
);
23 fprintf(stderr
, "Done.\n");
29 static const char *my_other_global
= "test\n\00abc";
33 fputs(my_other_global
, stderr
);
38 // CHECK-NOT: ERROR: AddressSanitizer: odr-violation