OSDN Git Service

(simple_cst_equal): Don't look at language-specific nodes since we
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 May 1995 11:00:47 +0000 (11:00 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 May 1995 11:00:47 +0000 (11:00 +0000)
don't know what's in them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9754 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/tree.c

index f97a95e..0388e8b 100644 (file)
@@ -3564,8 +3564,13 @@ simple_cst_equal (t1, t2)
       return 0;
     }
 
-  /* This general rule works for most tree codes.
-     All exceptions should be handled above.  */
+  /* This general rule works for most tree codes.  All exceptions should be
+     handled above.  If this is a language-specific tree code, we can't
+     trust what might be in the operand, so say we don't know
+     the situation.  */
+  if (code1
+      >= sizeof standard_tree_code_type / sizeof standard_tree_code_type[0])
+    return -1;
 
   switch (TREE_CODE_CLASS (code1))
     {