From 8949521ae3490a45611ca86827dfe32584854b26 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 20 May 2021 22:46:42 -0700 Subject: [PATCH] base: Initialize some variables in the wide multiply helpers. Not initializing them seems to upset older versions of g++. Change-Id: Ib3de0460463f2fe514175484c49e1df68dacb4d3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45819 Reviewed-by: Daniel Carvalho Reviewed-by: Matt Sinclair Maintainer: Gabe Black Tested-by: kokoro --- src/base/intmath.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/intmath.hh b/src/base/intmath.hh index 4be4a3b0e9..78d0795309 100644 --- a/src/base/intmath.hh +++ b/src/base/intmath.hh @@ -228,7 +228,7 @@ template static constexpr std::pair, std::make_unsigned_t> mulUnsigned(std::make_unsigned_t val_a, std::make_unsigned_t val_b) { - std::make_unsigned_t hi, low; + std::make_unsigned_t hi{}, low{}; mulUnsigned(hi, low, val_a, val_b); return {hi, low}; }; @@ -237,7 +237,7 @@ template static constexpr std::pair, std::make_signed_t> mulSigned(std::make_signed_t val_a, std::make_signed_t val_b) { - std::make_signed_t hi, low; + std::make_signed_t hi{}, low{}; mulSigned(hi, low, val_a, val_b); return {hi, low}; };