This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Traverse function types


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 -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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]