public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Traverse function types
@ 2010-12-21 18:59 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2010-12-21 18:59 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: crash --]
[-- Type: text/x-diff, Size: 565 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-21 18:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 18:59 Go patch committed: Traverse function types Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).