assert if someone tries to exchange a node with itself
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 6 Feb 2007 09:45:57 +0000 (09:45 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 6 Feb 2007 09:45:57 +0000 (09:45 +0000)
[r8595]

ir/ir/irgmod.c

index b604240..7d55d7a 100644 (file)
@@ -54,6 +54,7 @@ turn_into_tuple (ir_node *node, int arity)
 void
 exchange (ir_node *old, ir_node *nw)
 {
+  assert(old != nw && "Exchanging node with itself is not allowed");
   hook_replace(old, nw);
 
   /*