From 3ea121416060d8fc7c41e0ff005a1f2261d55b44 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 7 Feb 2006 22:46:23 +0000 Subject: [PATCH] More robust test for concat constant-ness. --- PExpr.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PExpr.cc b/PExpr.cc index 3640598c2..4eb852801 100644 --- a/PExpr.cc +++ b/PExpr.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: PExpr.cc,v 1.35 2004/10/04 01:10:51 steve Exp $" +#ident "$Id: PExpr.cc,v 1.35.2.1 2006/02/07 22:46:23 steve Exp $" #endif # include "config.h" @@ -90,6 +90,8 @@ bool PEConcat::is_constant(Module *mod) const { bool constant = repeat_? repeat_->is_constant(mod) : true; for (unsigned i = 0; constant && i < parms_.count(); ++i) { + if (parms_[i] == 0) + continue; constant = constant && parms_[i]->is_constant(mod); } return constant; @@ -262,6 +264,9 @@ bool PEUnary::is_constant(Module*m) const /* * $Log: PExpr.cc,v $ + * Revision 1.35.2.1 2006/02/07 22:46:23 steve + * More robust test for concat constant-ness. + * * Revision 1.35 2004/10/04 01:10:51 steve * Clean up spurious trailing white space. *