summaryrefslogtreecommitdiff
path: root/test/tsan/Darwin/objc-double-property.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/tsan/Darwin/objc-double-property.mm')
-rw-r--r--test/tsan/Darwin/objc-double-property.mm21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/tsan/Darwin/objc-double-property.mm b/test/tsan/Darwin/objc-double-property.mm
new file mode 100644
index 000000000000..51b10f21c9ca
--- /dev/null
+++ b/test/tsan/Darwin/objc-double-property.mm
@@ -0,0 +1,21 @@
+// RUN: %clangxx_tsan -O0 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O2 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O3 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
+
+#import <Foundation/Foundation.h>
+
+@interface MyClass : NSObject
+@property float a;
+@property double b;
+@property long double c;
+@end
+
+@implementation MyClass
+@end
+
+int main() {
+ NSLog(@"Hello world");
+}
+
+// CHECK: Hello world