mirror of
https://github.com/verilator/verilator.git
synced 2025-01-22 14:24:18 +00:00
Mark AstMemberSel as clean (#4236)
This commit is contained in:
parent
1069652701
commit
dfd3907787
@ -1450,7 +1450,7 @@ public:
|
||||
void name(const string& name) override { m_name = name; }
|
||||
string emitVerilog() override { V3ERROR_NA_RETURN(""); }
|
||||
string emitC() override { V3ERROR_NA_RETURN(""); }
|
||||
bool cleanOut() const override { return false; }
|
||||
bool cleanOut() const override { return true; }
|
||||
bool same(const AstNode* samep) const override { return true; } // dtype comparison does it
|
||||
int instrCount() const override { return widthInstrs(); }
|
||||
AstVar* varp() const { return m_varp; }
|
||||
|
@ -9,7 +9,12 @@ module t (/*AUTOARG*/);
|
||||
int fst, snd;
|
||||
} pair_t;
|
||||
|
||||
class Cls;
|
||||
pair_t p;
|
||||
endclass
|
||||
|
||||
pair_t a, b;
|
||||
Cls c = new;
|
||||
|
||||
initial begin
|
||||
a.fst = 1;
|
||||
@ -21,6 +26,15 @@ module t (/*AUTOARG*/);
|
||||
|
||||
$display("(%d, %d) (%d, %d)", a.fst, a.snd, b.fst, b.snd);
|
||||
$display("%%p=%p", a);
|
||||
|
||||
c.p.fst = 5;
|
||||
if (c.p.fst != 5) $stop;
|
||||
a = c.p;
|
||||
if (a.fst != 5) $stop;
|
||||
c.p = b;
|
||||
if (c.p.fst != 3) $stop;
|
||||
if (c.p.snd != 4) $stop;
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user