Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ hlsl_block_add_block(body, iter);
if (type == LOOP_DO_WHILE) - list_move_tail(&body->instrs, cond); + list_move_tail(&body->instrs, &cond->instrs); else - list_move_head(&body->instrs, cond); + list_move_head(&body->instrs, &cond->instrs);
if (!(loop = hlsl_new_loop(ctx, body, loc))) goto oom; - list_add_tail(init, &loop->entry); + hlsl_block_add_instr(init, loop);
vkd3d_free(cond); vkd3d_free(body); `destroy_block()` here too, but by now I suspect you're using `vkd3d_free()` intentionally. There are a couple of other instances in this commit, at any rate.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/258#note_37282