aboutsummaryrefslogtreecommitdiff
path: root/qbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'qbe.c')
-rw-r--r--qbe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qbe.c b/qbe.c
index f76f792..a6781dd 100644
--- a/qbe.c
+++ b/qbe.c
@@ -678,7 +678,7 @@ funcexpr(struct func *f, struct expr *e)
case EXPRIDENT:
d = e->u.ident.decl;
switch (d->kind) {
- case DECLOBJECT: return funcload(f, d->type, (struct lvalue){d->value});
+ case DECLOBJECT: return funcload(f, e->type, (struct lvalue){d->value});
case DECLCONST: return d->value;
default:
fatal("unimplemented declaration kind %d", d->kind);