From d0d933facc9085727c12f53de76a2cb879ded4c8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 5 May 2015 03:22:19 -0400 Subject: cpu: Work around gcc 4.9 issues with Num_OpClasses This patch fixes a recent issue with gcc 4.9 (and possibly more) being convinced that indices outside the array bounds are used when initialising the FUPool members. --- src/cpu/minor/execute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/minor/execute.cc') diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index 706fdf010..ea325e28c 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -150,7 +150,7 @@ Execute::Execute(const std::string &name_, } /** Check that there is a functional unit for all operation classes */ - for (int op_class = No_OpClass + 1; op_class < Num_OpClass; op_class++) { + for (int op_class = No_OpClass + 1; op_class < Num_OpClasses; op_class++) { bool found_fu = false; unsigned int fu_index = 0; -- cgit v1.2.3