<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Okay, this isn't something i'm sure about because i honestly cannot work out what the original code was attempting to do.</div><div><br class="webkit-block-placeholder"></div><div>This bug would occur when trying to assign to a member through an arrow dereference, as in:</div><div><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 11px; white-space: pre-wrap; ">expression_t *create_expression() {
    expression_t *expr = (expression_t*)malloc(sizeof(expression_t));
    expr->nChildren = 0;
    return expr;
}</span></div><div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;"><br class="webkit-block-placeholder"></span></font></div><div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;">This would produce</span></font></div><div><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;">define %struct.expression_s* @create_expression() {
entry:
        %expr = alloca %struct.expression_s*            ; <%struct.expression_s**> [#uses=3]
...
        %tmp = bitcast %struct.expression_s** %expr to %struct.expression_s*            ; <%struct.expression_s*> [#uses=1]
...
}</span></font></div><br><div>Where it cast to the appropriate type rather than doing a load.</div><div><br class="webkit-block-placeholder"></div><div>the obvious solution is to replace CreateBitCast with CreateLoad (what this patch does), but i can't help<br></div><div>but worry that someone has done this deliberately at some point, and i'm just missing something important :-/</div><div><br class="webkit-block-placeholder"></div><div></div></body></html>