diff mbox

Go patch committed: Traverse function types

Message ID mcrpqsvm1ys.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Dec. 21, 2010, 6:10 p.m. UTC
In the function traversal routine, I forgot to traverse the function
type itself.  Doing this avoids a crash when an array has an unknown
length.  Bootstrapped and tested on x86_64-unknown-linux-gnu.  Committed
to mainline.

Ian
diff mbox

Patch

diff -r 997516c45e8b go/gogo.cc
--- a/go/gogo.cc	Mon Dec 20 22:11:12 2010 -0800
+++ b/go/gogo.cc	Tue Dec 21 10:05:18 2010 -0800
@@ -2644,6 +2644,14 @@ 
 {
   unsigned int traverse_mask = traverse->traverse_mask();
 
+  if ((traverse_mask
+       & (Traverse::traverse_types | Traverse::traverse_expressions))
+      != 0)
+    {
+      if (Type::traverse(this->type_, traverse) == TRAVERSE_EXIT)
+	return TRAVERSE_EXIT;
+    }
+
   // FIXME: We should check traverse_functions here if nested
   // functions are stored in block bindings.
   if (this->block_ != NULL