tests: Fix compiler tests (#1678)

- This change updates syntax of constructors of Template Classes from
`class<T>()` to `class()`

- Initializes coherence to 0 in `src/mem/cache_blk.hh`

The above changes are made to solve the errors when compiling gem5 in
gcc 14
This commit is contained in:
Harshil Patel
2024-10-17 11:19:46 -07:00
committed by GitHub
parent d454e421d2
commit 7591f2a843
4 changed files with 6 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ class ArmFaultVals : public ArmFault
static FaultVals vals;
public:
ArmFaultVals<T>(ExtMachInst mach_inst = 0, uint32_t _iss = 0) :
ArmFaultVals(ExtMachInst mach_inst = 0, uint32_t _iss = 0) :
ArmFault(mach_inst, _iss) {}
FaultName name() const override { return vals.name; }
FaultOffset offset(ThreadContext *tc) override;

View File

@@ -350,9 +350,9 @@ class Rate : public Base
"otherwise, it would be a Ratio");
private:
Rate<T1,T2>() {}
Rate() {}
public:
Rate<T1,T2>(Rate<T1,T2> const&) = delete;
Rate(Rate const&) = delete;
void operator=(Rate<T1,T2> const&) = delete;
static Rate<T1,T2>*
get()

View File

@@ -477,7 +477,7 @@ class VirtQueue : public Serializable
Index index;
};
VirtRing<T>(PortProxy &proxy, ByteOrder bo, uint16_t size) :
VirtRing(PortProxy &proxy, ByteOrder bo, uint16_t size) :
header{0, 0}, ring(size), _proxy(proxy), _base(0), byteOrder(bo)
{}
@@ -550,7 +550,7 @@ class VirtQueue : public Serializable
private:
// Remove default constructor
VirtRing<T>();
VirtRing();
/** Guest physical memory proxy */
PortProxy &_proxy;

View File

@@ -461,7 +461,7 @@ class CacheBlk : public TaggedEntry
protected:
/** The current coherence status of this block. @sa CoherenceBits */
unsigned coherence;
unsigned coherence = 0;
// The following setters have been marked as protected because their
// respective variables should only be modified at 2 moments: