...
See <rdar://problem/52545976> The metal reduction is: ``` #include <metal_stdlib> #include <metal_atomic> #include <metal_math> #include <metal_relational> #include <metal_compute> #include <metal_texture> using namespace metal; typedef array<float, 10> BaseArray; typedef array<BaseArray, 5> ParentArray; struct WrapperStruct { ParentArray parentArray; uint outerIndex; BaseArray baseArray; uint index; }; struct InputStruct { device int32_t* ptr [[id(0)]]; uint2 structureElement20 [[id(1)]]; }; kernel void computeShader(device int32_t* ptr) { WrapperStruct wrapperStruct = { 0 }; wrapperStruct.parentArray = { 0 }; wrapperStruct.outerIndex = 0; for (; wrapperStruct.outerIndex < wrapperStruct.parentArray.size(); ++wrapperStruct.outerIndex) { wrapperStruct.baseArray = { 0 }; for (unsigned j = 0; j < wrapperStruct.baseArray.size(); ++j) { wrapperStruct.baseArray[j] = wrapperStruct.outerIndex; } wrapperStruct.parentArray[wrapperStruct.outerIndex] = wrapperStruct.baseArray; } wrapperStruct.outerIndex = 0; for (; wrapperStruct.outerIndex < wrapperStruct.parentArray.size(); wrapperStruct.outerIndex++) { wrapperStruct.baseArray = wrapperStruct.parentArray[wrapperStruct.outerIndex]; wrapperStruct.index = 0; for ( ; wrapperStruct.index < wrapperStruct.baseArray.size(); wrapperStruct.index += 1) { if (wrapperStruct.baseArray[wrapperStruct.index] != wrapperStruct.outerIndex) { *ptr = 42; return; } } } *ptr = 1; } ``` *ptr should be 1, but is 42.
Created attachment 373366 [details] patch
Comment on attachment 373366 [details] patch 🤮
Comment on attachment 373366 [details] patch Clearing flags on attachment: 373366 Committed r247081: <https://trac.webkit.org/changeset/247081>
All reviewed patches have been landed. Closing bug.
<rdar://problem/52556060>