Patchwork [gccgo] Don't crash when converting abstract integer to interface type

login
register
mail settings
Submitter Ian Taylor
Date Sept. 2, 2010, 12:39 a.m.
Message ID <mcrr5hd6ksm.fsf@google.com>
Download mbox | patch
Permalink /patch/63429/
State New
Headers show

Comments

Ian Taylor - Sept. 2, 2010, 12:39 a.m.
This small gccgo patch fixes a crash when an abstract integer is
converted to an interface type.  Committed to gccgo branch.

Ian

Patch

diff -r 97d6b90859a0 go/expressions.cc
--- a/go/expressions.cc	Wed Sep 01 17:06:46 2010 -0700
+++ b/go/expressions.cc	Wed Sep 01 17:37:35 2010 -0700
@@ -2826,7 +2826,7 @@ 
   void
   do_determine_type(const Type_context*)
   {
-    Type_context subcontext(this->type_, true);
+    Type_context subcontext(this->type_, false);
     this->expr_->determine_type(&subcontext);
   }