From 9fbb7f84e696264753cbdcfadc88459b1031e130 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 13 Dec 2015 19:00:04 -0800 Subject: [PATCH] A VHDL ExpAttribute() can share the base so don't just delete them --- vhdlpp/expression.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vhdlpp/expression.cc b/vhdlpp/expression.cc index 4361656a0..92d3ab748 100644 --- a/vhdlpp/expression.cc +++ b/vhdlpp/expression.cc @@ -61,7 +61,9 @@ ExpAttribute::ExpAttribute(ExpName*bas, perm_string nam) ExpAttribute::~ExpAttribute() { - delete base_; + /* Different attributes can point to the same base so we cannot delete this here. + * Look at the vhdl_range test with valgrind to see this issue. */ +// delete base_; } Expression*ExpAttribute::clone() const