forked from github/verilator
Internals: Fix uninitialized m_alhs
This commit is contained in:
parent
ac61548e6a
commit
b31a7cdcbf
@ -84,8 +84,10 @@ void AstVar::combineType(AstVarType type) {
|
|||||||
// These flags get combined with the existing settings of the flags.
|
// These flags get combined with the existing settings of the flags.
|
||||||
if (type==AstVarType::INPUT || type==AstVarType::INOUT)
|
if (type==AstVarType::INPUT || type==AstVarType::INOUT)
|
||||||
m_input = true;
|
m_input = true;
|
||||||
if (type==AstVarType::OUTPUT || type==AstVarType::INOUT)
|
if (type==AstVarType::OUTPUT || type==AstVarType::INOUT) {
|
||||||
m_output = true;
|
m_output = true;
|
||||||
|
m_declOutput = true;
|
||||||
|
}
|
||||||
if (type==AstVarType::INOUT || type==AstVarType::TRIWIRE
|
if (type==AstVarType::INOUT || type==AstVarType::TRIWIRE
|
||||||
|| type==AstVarType::TRI0 || type==AstVarType::TRI1)
|
|| type==AstVarType::TRI0 || type==AstVarType::TRI1)
|
||||||
m_tristate = true;
|
m_tristate = true;
|
||||||
|
@ -709,6 +709,7 @@ private:
|
|||||||
bool m_input:1; // Input or inout
|
bool m_input:1; // Input or inout
|
||||||
bool m_output:1; // Output or inout
|
bool m_output:1; // Output or inout
|
||||||
bool m_tristate:1; // Inout or triwire or trireg
|
bool m_tristate:1; // Inout or triwire or trireg
|
||||||
|
bool m_declOutput:1; // Inout or output before tristate resolution
|
||||||
bool m_primaryIO:1; // In/out to top level (or directly assigned from same)
|
bool m_primaryIO:1; // In/out to top level (or directly assigned from same)
|
||||||
bool m_sc:1; // SystemC variable
|
bool m_sc:1; // SystemC variable
|
||||||
bool m_scClocked:1; // SystemC sc_clk<> needed
|
bool m_scClocked:1; // SystemC sc_clk<> needed
|
||||||
@ -734,7 +735,7 @@ private:
|
|||||||
bool m_trace:1; // Trace this variable
|
bool m_trace:1; // Trace this variable
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
m_input=false; m_output=false; m_tristate=false;
|
m_input=false; m_output=false; m_tristate=false; m_declOutput=false;
|
||||||
m_primaryIO=false;
|
m_primaryIO=false;
|
||||||
m_sc=false; m_scClocked=false; m_scSensitive=false;
|
m_sc=false; m_scClocked=false; m_scSensitive=false;
|
||||||
m_usedClock=false; m_usedParam=false; m_usedLoopIdx=false;
|
m_usedClock=false; m_usedParam=false; m_usedLoopIdx=false;
|
||||||
@ -840,6 +841,7 @@ public:
|
|||||||
bool isOutOnly() const { return m_output && !m_input; }
|
bool isOutOnly() const { return m_output && !m_input; }
|
||||||
bool isInout() const { return m_input && m_output; }
|
bool isInout() const { return m_input && m_output; }
|
||||||
bool isTristate() const { return m_tristate; }
|
bool isTristate() const { return m_tristate; }
|
||||||
|
bool isDeclOutput() const { return m_declOutput; }
|
||||||
bool isPrimaryIO() const { return m_primaryIO; }
|
bool isPrimaryIO() const { return m_primaryIO; }
|
||||||
bool isPrimaryIn() const { return isPrimaryIO() && isInput(); }
|
bool isPrimaryIn() const { return isPrimaryIO() && isInput(); }
|
||||||
bool isIO() const { return (m_input||m_output); }
|
bool isIO() const { return (m_input||m_output); }
|
||||||
|
@ -858,9 +858,10 @@ class TristateVisitor : public TristateBaseVisitor {
|
|||||||
public:
|
public:
|
||||||
// CONSTUCTORS
|
// CONSTUCTORS
|
||||||
TristateVisitor(AstNode* nodep) {
|
TristateVisitor(AstNode* nodep) {
|
||||||
m_unique = 0;
|
|
||||||
m_cellp = NULL;
|
|
||||||
m_modp = NULL;
|
m_modp = NULL;
|
||||||
|
m_cellp = NULL;
|
||||||
|
m_unique = 0;
|
||||||
|
m_alhs = false;
|
||||||
nodep->accept(*this);
|
nodep->accept(*this);
|
||||||
}
|
}
|
||||||
virtual ~TristateVisitor() {
|
virtual ~TristateVisitor() {
|
||||||
|
Loading…
Reference in New Issue
Block a user