aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-01 22:55:33 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-01 22:55:33 +0100
commit2c8b99337bb33d0f713026c5c38e05428cc52143 (patch)
treec8bd846f86e65ac98962f855db73d05a16237db4 /src
parent5008e2c88b314156e0388db7f7ed789fb828c7e4 (diff)
Fix `conj`
Diffstat (limited to 'src')
-rw-r--r--src/ir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.c b/src/ir.c
index 374aea0a2..bfe4f3781 100644
--- a/src/ir.c
+++ b/src/ir.c
@@ -4003,14 +4003,14 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) {
irValue *res = NULL;
Type *t = ir_type(val);
if (is_type_complex(t)) {
- irValue *res = ir_add_local_generated(proc, tv->type);
+ res = ir_add_local_generated(proc, tv->type);
irValue *real = ir_emit_struct_ev(proc, val, 0);
irValue *imag = ir_emit_struct_ev(proc, val, 1);
imag = ir_emit_unary_arith(proc, Token_Sub, imag, ir_type(imag));
ir_emit_store(proc, ir_emit_struct_ep(proc, res, 0), real);
ir_emit_store(proc, ir_emit_struct_ep(proc, res, 1), imag);
} else if (is_type_quaternion(t)) {
- irValue *res = ir_add_local_generated(proc, tv->type);
+ res = ir_add_local_generated(proc, tv->type);
irValue *real = ir_emit_struct_ev(proc, val, 0);
irValue *imag = ir_emit_struct_ev(proc, val, 1);
irValue *jmag = ir_emit_struct_ev(proc, val, 2);