Hi,
There has been a change in SIMD handling in swift since Xcode 8 beta 1, which is resulting in the debug build crashing under certain circumstances. The repro for this is extremely simple.
The following code snippet with build in release mode but fail in debug mode:
import UIKit
import simd
class ViewController: UIViewController {
let f2 = float2(0, 0)
override func viewDidLoad() {
super.viewDidLoad()
let crash_debug = int2(Int32(f2.x), Int32(f2.y))
print("*** crash_debug = \(crash_debug)")
}
}
In particular the issue is related to "crash_debug" being declared as a constant, which is correct however. I can work around this issue by changing the declaration of "crash_debug" from using "let" to using "var". This allows the debug build to succeed, however this results in a warning stating that "crash_debug" is not changed anywhere and should be declated with "let".
I've already created a bug report for this over at "bugreport.apple.com" but it has not gotten any attention - 27718172
Regards,
Joe