diff --git a/net_event.cc b/net_event.cc index b3c5b1459..7868f2160 100644 --- a/net_event.cc +++ b/net_event.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: net_event.cc,v 1.16 2001/10/28 01:14:53 steve Exp $" +#ident "$Id: net_event.cc,v 1.17 2002/02/02 06:13:38 steve Exp $" #endif # include "config.h" @@ -171,7 +171,12 @@ NetEvent* NetEvent::find_similar_event() if (tmp->edge() != cur->edge()) continue; - table[ncand++].ev = tmp->event(); + /* Don't include myself in the list of candidates. */ + NetEvent*etmp = tmp->event(); + if (etmp == this) + continue; + + table[ncand++].ev = etmp; assert(ncand <= max_cand); } @@ -451,6 +456,9 @@ NetProc* NetEvWait::statement() /* * $Log: net_event.cc,v $ + * Revision 1.17 2002/02/02 06:13:38 steve + * event find_similar should not find self. + * * Revision 1.16 2001/10/28 01:14:53 steve * NetObj constructor finally requires a scope. * diff --git a/nodangle.cc b/nodangle.cc index a09caf067..01ef9f1c9 100644 --- a/nodangle.cc +++ b/nodangle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: nodangle.cc,v 1.13 2001/07/27 02:41:55 steve Exp $" +#ident "$Id: nodangle.cc,v 1.14 2002/02/02 06:13:38 steve Exp $" #endif # include "config.h" @@ -42,6 +42,7 @@ class nodangle_f : public functor_t { void nodangle_f::event(Design*des, NetEvent*ev) { if (NetEvent*match = ev->find_similar_event()) { + assert(match != ev); ev->replace_event(match); } @@ -130,6 +131,9 @@ void nodangle(Design*des) /* * $Log: nodangle.cc,v $ + * Revision 1.14 2002/02/02 06:13:38 steve + * event find_similar should not find self. + * * Revision 1.13 2001/07/27 02:41:55 steve * Fix binding of dangling function ports. do not elide them. *