From patchwork Thu Sep 2 00:39:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 63429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6D674B715C for ; Thu, 2 Sep 2010 10:39:39 +1000 (EST) Received: (qmail 31472 invoked by alias); 2 Sep 2010 00:39:36 -0000 Received: (qmail 31458 invoked by uid 22791); 2 Sep 2010 00:39:36 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_CC, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Sep 2010 00:39:31 +0000 Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id o820dSI5000653 for ; Wed, 1 Sep 2010 17:39:29 -0700 Received: from pxi11 (pxi11.prod.google.com [10.243.27.11]) by hpaq5.eem.corp.google.com with ESMTP id o820cxfb013875 for ; Wed, 1 Sep 2010 17:39:27 -0700 Received: by pxi11 with SMTP id 11so3446685pxi.20 for ; Wed, 01 Sep 2010 17:39:27 -0700 (PDT) Received: by 10.114.39.7 with SMTP id m7mr265985wam.201.1283387966853; Wed, 01 Sep 2010 17:39:26 -0700 (PDT) Received: from coign.google.com ([66.109.106.2]) by mx.google.com with ESMTPS id d39sm19572273wam.16.2010.09.01.17.39.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 17:39:25 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: [gccgo] Don't crash when converting abstract integer to interface type Date: Wed, 01 Sep 2010 17:39:21 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This small gccgo patch fixes a crash when an abstract integer is converted to an interface type. Committed to gccgo branch. Ian 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); }