From: Andrea Mondelli Date: Mon, 18 May 2020 17:50:33 +0000 (+0800) Subject: cpu: fixed unused variable on fast binary X-Git-Tag: v20.1.0.0~641 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd580041fe62e51f2386af5be0ad92e735ba1e24;p=gem5.git cpu: fixed unused variable on fast binary When gem5.fast is compiled, an error on a variable used only for debug purposes is raised: build/X86/cpu/o3/mem_dep_unit_impl.hh:262:19: error: unused variable 'producing_store' [-Werror=unused-variable] for (auto producing_store : producing_stores) This patch remove the variable when *.fast is used. Change-Id: Ib77c26073db39644e3525bc16edcb7d3bc871d76 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29252 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce --- diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index 9a50341b4..d1eac2996 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -259,7 +259,7 @@ MemDepUnit::insert(const DynInstPtr &inst) } else { // Otherwise make the instruction dependent on the store/barrier. DPRINTF(MemDepUnit, "Adding to dependency list\n"); - for (auto producing_store : producing_stores) + for (auto M5_VAR_USED producing_store : producing_stores) DPRINTF(MemDepUnit, "\tinst PC %s is dependent on [sn:%lli].\n", inst->pcState(), producing_store);