From 149e370ff390d669bf60948dbbafb502c010aa54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 28 Sep 2000 18:26:01 +0200
Subject: [PATCH] Fix for infinite loop in optimizer.

Rev: src/las.c:1.217
---
 src/las.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/las.c b/src/las.c
index be532e26da..db30eae4ab 100644
--- a/src/las.c
+++ b/src/las.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: las.c,v 1.216 2000/09/26 22:19:03 hubbe Exp $");
+RCSID("$Id: las.c,v 1.217 2000/09/28 16:26:01 grubba Exp $");
 
 #include "language.h"
 #include "interpret.h"
@@ -4193,13 +4193,14 @@ static void optimize(node *n)
       tmp1 = freeze_node(n);
       if (tmp1 != n) {
 	/* n was a duplicate node. Use the original. */
+	/* Make sure the original isn't defrosted too. */
+	tmp1->node_info &= ~OPT_DEFROSTED;
 	goto use_tmp1;
       }
       /* Remove the extra ref from n */
       free_node(n);
-#else /* IN_TPIKE */
-      n->node_info &= ~OPT_DEFROSTED;
 #endif /* !IN_TPIKE */
+      n->node_info &= ~OPT_DEFROSTED;
       if (n->node_info & OPT_OPTIMIZED) {
 	/* No need to check this node any more. */
 	n = n->parent;
-- 
GitLab