From patchwork Tue Nov 19 14:58:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 292467 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1B09E2C0126 for ; Wed, 20 Nov 2013 01:59:09 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=AxKLlarjZckfQfL/6KW+TuXDcbvI74jHbjfsPwjPp+LQhK15aA ky6LJ5/T+PBqs9p8tqKeCk6Cg8+UsBtgCHHOW2W8627jmZ5KYWfPec5LE52zKveH olPjHpHeYdy5ehkhK/vZcPmtBqFrodJ5+GsIV6n1HZPIEPM2ctFiwCpjA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=zwaBEZ3YYW2F4k2fh4MM4VvpDYA=; b=nXnVzUZaeBmNgoH7mGzh 3um9yd0LUorIAyZ7Ep0LZ9xhKIsXBylvcSUT+P44Rxp/dDkpRRkUbxfL16X5l/1o 9WI/vaLEYHKW6MwaUZ0VnX1YHqz+6TbOc1ueUuplm6FfiFAFTwpJRWHiDliL5u0o TCwlTmz+r4gHAlsjQrE2Ujc= Received: (qmail 30633 invoked by alias); 19 Nov 2013 14:58:46 -0000 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 Received: (qmail 30619 invoked by uid 89); 19 Nov 2013 14:58:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-pd0-f181.google.com Received: from Unknown (HELO mail-pd0-f181.google.com) (209.85.192.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 19 Nov 2013 14:58:45 +0000 Received: by mail-pd0-f181.google.com with SMTP id p10so555979pdj.40 for ; Tue, 19 Nov 2013 06:58:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-type; bh=5Ui0EevTtd8I/Y1rh+3Ofur6Z9cOv5b328kVB4ymAYY=; b=aDVklztmdmhukroIKiH2mHRYsYEyyjdB+xeX9xP8e/t02aBGn7DECSb7KmSQX2KBYa aFpgU+Yn/pjfD4vv9TBnQS4uUmXIDMT0LonZmN7qoRKIQE/rWCAjvZWOg/47S2UrWTQl 8T7UDLCCh13GqssXWxGW4UB8dAiQTF40eGFgCD6e6XKg5MT+0FUPRSJsWAUVMo7cUCML MOqmgVHPu0adxc4EjgG7UY5ksS98m/akiFc85soyFGGRkwnm2oECBSzKqkCcEElGyzrf jwg5I/OqdMtRyVYudMqEIoAUuiRSP4pVAzXNGcrgJ1+Hl+5DAR+rKxWTe4ooEFErMJAA S6rQ== X-Gm-Message-State: ALoCoQlPIGavub+GwPvvMm9uOYaQda8vflZ/m9DQdcMxF5BEb2Bhn9+NNAG1nPz7Cm3RZftmLq5vqmDvhL/YrplqeKNXNpDRS+PYl0jUAdKL/ZRCr5hLv9ghw/xJAemqSPL3mFhw0aeFsH67y1kILsv40HHCKPPgsklG/KDL936j+LaKMQ6EuPmHW5LOKfM3qorbKr4QYKAHf0DhJFChuiZiPAgAGTSRpA== X-Received: by 10.66.159.132 with SMTP id xc4mr27143471pab.27.1384873117165; Tue, 19 Nov 2013 06:58:37 -0800 (PST) Received: from iant-glaptop.roam.corp.google.com.google.com ([207.198.105.20]) by mx.google.com with ESMTPSA id ik1sm4267691pbc.9.2013.11.19.06.58.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 19 Nov 2013 06:58:36 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Cc: dave@cheney.net Subject: Go patch committed: Update for mainline changes Date: Tue, 19 Nov 2013 06:58:33 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes This patch to the Go frontend incorporates patches by Richard S and Diego for changes to the middle-end. These patches were already committed to the GCC repository. This change commits them to the master Go repository. Ian diff -r 75537ee240ab go/expressions.cc --- a/go/expressions.cc Mon Nov 18 18:29:34 2013 -0800 +++ b/go/expressions.cc Tue Nov 19 06:55:30 2013 -0800 @@ -11,6 +11,8 @@ #include "toplev.h" #include "intl.h" #include "tree.h" +#include "stringpool.h" +#include "stor-layout.h" #include "gimple.h" #include "gimplify.h" #include "tree-iterator.h" @@ -3343,9 +3345,9 @@ tree int_type_tree = type_to_tree(int_type->get_backend(gogo)); expr_tree = fold_convert(int_type_tree, expr_tree); - if (host_integerp(expr_tree, 0)) - { - HOST_WIDE_INT intval = tree_low_cst(expr_tree, 0); + if (tree_fits_shwi_p (expr_tree)) + { + HOST_WIDE_INT intval = tree_to_shwi (expr_tree); std::string s; Lex::append_char(intval, true, &s, this->location()); Expression* se = Expression::make_string(s, this->location()); diff -r 75537ee240ab go/gogo-tree.cc --- a/go/gogo-tree.cc Mon Nov 18 18:29:34 2013 -0800 +++ b/go/gogo-tree.cc Tue Nov 19 06:55:30 2013 -0800 @@ -8,6 +8,9 @@ #include "toplev.h" #include "tree.h" +#include "stringpool.h" +#include "stor-layout.h" +#include "varasm.h" #include "gimple.h" #include "gimplify.h" #include "tree-iterator.h"