Hoa Nguyen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/31634 )
Change subject: systemc: Fix systemc array bound error
......................................................................
systemc: Fix systemc array bound error
Currently, g++-10 does not compile gem5 due to an array bound error
in sc_unsigned and sc_signed constructors.
This commit addresses this issue.
Change-Id: Id65b6d52cef527f62917e09231ff79e2237affd8
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M src/systemc/dt/int/sc_nbcommon.inc
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/systemc/dt/int/sc_nbcommon.inc
b/src/systemc/dt/int/sc_nbcommon.inc
index 13317a6..aebf03a 100644
--- a/src/systemc/dt/int/sc_nbcommon.inc
+++ b/src/systemc/dt/int/sc_nbcommon.inc
@@ -2275,9 +2275,13 @@
sc_value_base(), sgn(s), nbits(num_bits(nb)), ndigits(), digit()
{
ndigits = DIV_CEIL(nbits);
+/*
#ifndef SC_MAX_NBITS
digit = new sc_digit[ndigits];
#endif
+*/
+
+ digit = new sc_digit[ndigits];
if (ndigits <= nd)
vec_copy(ndigits, digit, d);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/31634
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id65b6d52cef527f62917e09231ff79e2237affd8
Gerrit-Change-Number: 31634
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s