Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / Darwin / objc-odr.mm
blobc4c240ee419cc05cd36d98322a764fc45e590dc2
1 // Regression test for
2 // https://code.google.com/p/address-sanitizer/issues/detail?id=360.
4 // RUN: %clang_asan %s -o %t -framework Foundation
5 // RUN: %run %t 2>&1 | FileCheck %s
7 #import <Foundation/Foundation.h>
9 void f() {
10     int y = 7;
11     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
12         dispatch_sync(dispatch_get_main_queue(), ^{
13             printf("num = %d\n", y);
14         });
15     });
18 int main() {
19   fprintf(stderr,"Hello world");
22 // CHECK-NOT: AddressSanitizer: odr-violation
23 // CHECK: Hello world