hi all, i am currently running into a compiler crash in lib/SIL/Verifier/LinearLifetimeCheckerPrivate.h, which first appeared in the DEVELOPMENT-SNAPSHOT-2022-08-24-a nightly and is apparently still present in DEVELOPMENT-SNAPSHOT-2022-09-06-a.
i’ve reduced the crasher to the following test program:
struct C<T> where T:AdditiveArithmetic
{
var x:[Int]
let y:T
init()
{
self.x = [0]
self.y = .zero
}
var z:Int
{
_read
{
yield self.x[0]
}
_modify
{
yield &self.x[0]
}
}
}
struct S
{
var c:C<Int>
init()
{
self.c = .init()
let _:Int = self.c.z
}
}
despite not being used anywhere, the y member is required to cause the crash. it also only occurs if the C<Int> specialization is a stored property of a struct, and an attempt is made to read the value of z.
this crasher is preventing me from upgrading my toolchain past DEVELOPMENT-SNAPSHOT-2022-08-18-a, which was the last good nightly that could compile this code.
can anyone help me out here?