In struct instruction, OP_LOAD & OP_STORE are defined like unops and so the pseudo holding the address should be 'insn->src'. OTOH, 'insn->symbol' is supposed to be used only for OP_SYMADDR. However, in graph.c, the field 'symbol' is used for OP_LOAD/STORE's address. Now, this doesn't matter much as the field 'src' & 'symbol' are aliased/unioned (together with 'src1', 'cond', ...) but it can be confusing. Change this by using the field 'src' for memops here too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- graph.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graph.c b/graph.c index c9af9a580..c83a1c42b 100644 --- a/graph.c +++ b/graph.c @@ -76,15 +76,15 @@ static void graph_ep(struct entrypoint *ep) FOR_EACH_PTR(bb->insns, insn) { switch(insn->opcode) { case OP_STORE: - if (insn->symbol->type == PSEUDO_SYM) { - printf("%s store(%s)", s, show_ident(insn->symbol->sym->ident)); + if (insn->src->type == PSEUDO_SYM) { + printf("%s store(%s)", s, show_ident(insn->src->sym->ident)); s = ","; } break; case OP_LOAD: - if (insn->symbol->type == PSEUDO_SYM) { - printf("%s load(%s)", s, show_ident(insn->symbol->sym->ident)); + if (insn->src->type == PSEUDO_SYM) { + printf("%s load(%s)", s, show_ident(insn->src->sym->ident)); s = ","; } break; -- 2.16.3 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html