20536, "vasslitvinov", "Reduce intent bug", "2022-08-26T21:34:15Z"
A reduce intents specifically in a coforall crashes the compiler if it uses a class instance as the reduce op. The following example fails INT_ASSERT(elem.value == markUnspecified)
in createTaskFunctions.cpp, however works if we replace coforall with forall:
var rOp = new unmanaged SumReduceScanOp(eltType = int);
var sum = 0;
coforall i in 1..5 with (rOp reduce sum) do // compiler assertion failure here
sum += i;
writeln(sum);
It is due to how we lower task constructs such as coforalls in the pre-dyno compiler.
Test: TBD