From 4901877d241e49025431dbc08b909fd0d4828528 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Thu, 13 Jun 2013 19:08:59 +0200 Subject: [PATCH] Handle side-effects in TupleExp::e0. Fixes DMD testcase 'aliasthis'. --- gen/toir.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gen/toir.cpp b/gen/toir.cpp index 6789bd98..a4d81501 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -3159,6 +3159,9 @@ DValue* TupleExp::toElem(IRState *p) IF_LOG Logger::print("TupleExp::toElem() %s\n", toChars()); LOG_SCOPE; + // If there are any side effects, evaluate them first. + if (e0) e0->toElem(p); + std::vector types; types.reserve(exps->dim); for (size_t i = 0; i < exps->dim; i++)