From a74b26a9bce11028b9db21424aa6f32c32fe7d8e Mon Sep 17 00:00:00 2001
From: "Wolfgang (Blub) Bumiller" <blub@speed.at>
Date: Sat, 18 Aug 2012 12:45:29 +0200
Subject: [PATCH] Add an error output in the ast where I missed one (there are
 probably more places which need one)

---
 ast.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ast.c b/ast.c
index d8bd293..e4d1859 100644
--- a/ast.c
+++ b/ast.c
@@ -1145,8 +1145,12 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i
         *out = ir_block_create_load_from_ent(func->curblock, ast_function_label(func, "efv"),
                                              ent, field, self->expression.vtype);
     }
-    if (!*out)
+    if (!*out) {
+        asterror(ast_ctx(self), "failed to create %s instruction (output type %s)",
+                 (lvalue ? "ADDRESS" : "FIELD"),
+                 type_name[self->expression.vtype]);
         return false;
+    }
 
     if (lvalue)
         self->expression.outl = *out;