From 19338906ba8efe6179336e36b8679656eadcede5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 16 Mar 2010 12:30:13 +0100 Subject: [PATCH] Preprocessor: add a check to DynamicModel::toStatic() --- preprocessor/DynamicModel.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc index 7bd7795c9..1e0a71dad 100644 --- a/preprocessor/DynamicModel.cc +++ b/preprocessor/DynamicModel.cc @@ -2452,6 +2452,10 @@ DynamicModel::writeDynamicFile(const string &basename, bool block, bool bytecode void DynamicModel::toStatic(StaticModel &static_model) const { + /* Ensure that we are using the same symbol table, because at many places we manipulate + symbol IDs rather than strings */ + assert(&symbol_table == &static_model.symbol_table); + // Convert model local variables (need to be done first) for (map::const_iterator it = local_variables_table.begin(); it != local_variables_table.end(); it++)