Skip to content

Commit 9fc98bf

Browse files
kubamracekCodaFi
authored andcommitted
Add a test for a compiler crasher with -O -whole-module-optimization -sanitize=address
1 parent dc122a3 commit 9fc98bf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: %target-run-simple-swift(-O -whole-module-optimization -sanitize=address)
2+
3+
// REQUIRES: executable_test
4+
// REQUIRES: foundation
5+
// REQUIRES: asan_runtime
6+
7+
import Foundation
8+
9+
struct MyStruct {
10+
let value = Data()
11+
}
12+
13+
class MyClass: NSObject {
14+
var x: Int = {
15+
_ = MyStruct()
16+
return 0
17+
}()
18+
}

0 commit comments

Comments
 (0)