summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bejit.c
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-08-05 19:09:42 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-08-05 19:09:42 +0200
commite606a37dee29d9dbab53967ccd65c1066e44f31b (patch)
tree470349e309803a2040e7156c30bfe035bc3d9e56 /ir/be/bejit.c
parent0637f39ef55b7d973650e3db51d9e56c898b545d (diff)
Fix warning in optimize build
Diffstat (limited to 'ir/be/bejit.c')
-rw-r--r--ir/be/bejit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ir/be/bejit.c b/ir/be/bejit.c
index 5ba375d..90d465a 100644
--- a/ir/be/bejit.c
+++ b/ir/be/bejit.c
@@ -112,7 +112,9 @@ static void layout_fragments(ir_jit_function_t *const function,
fragment_info_t **const fragment_infos = function->fragment_infos;
unsigned address = 0;
+#ifndef NDEBUG
unsigned orig_address = 0;
+#endif
for (unsigned i = 0; i < n_fragments; ++i) {
fragment_info_t *const fragment = fragment_infos[i];
assert(fragment->address == ~0u);
@@ -126,7 +128,9 @@ static void layout_fragments(ir_jit_function_t *const function,
fragment->address = address;
address += fragment->len;
+#ifndef NDEBUG
orig_address += fragment->len;
+#endif
}
function->size = address;
assert(code_size == orig_address);