public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Fix another crash with Sizeof of undefined type
@ 2010-12-16  0:18 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2010-12-16  0:18 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This patch to the Go frontend fixes a different crash which occurs when
using Sizeof on an undefined type.  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: foo.patch --]
[-- Type: text/x-diff, Size: 448 bytes --]

diff -r cd8e1c7365a0 go/expressions.cc
--- a/go/expressions.cc	Wed Dec 15 15:56:00 2010 -0800
+++ b/go/expressions.cc	Wed Dec 15 15:58:33 2010 -0800
@@ -7069,7 +7069,8 @@
       return false;
     }
   if (args->front()->is_error_expression()
-      || args->front()->type()->is_error_type())
+      || args->front()->type()->is_error_type()
+      || args->front()->type()->is_undefined())
     {
       this->set_is_error();
       return false;

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

only message in thread, other threads:[~2010-12-16  0:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-16  0:18 Go patch committed: Fix another crash with Sizeof of undefined type 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).