From patchwork Tue Dec 1 04:46:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 550649 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 064C6140291 for ; Tue, 1 Dec 2015 15:46:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=iogi1NI1; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=USdBjD4GrpJbQAXTxVFagECoXYWvteeT/Y7nSU/J8p4KvT U9Ey2O/dQbCnZvLDSpzYPlmT9OYpq+XX6wMgW/vN2qaii+GZK5eUh37cvhhLCbXz JyXaqTGCFVgoakx6w8ScyEpihnFAapNE7YqArxXmqhZI38hpHIWmlSc5vQPQs= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=Lw8MDLEXpwYaChqpyHHxHhundLg=; b=iogi1NI1S+mq3qyktlrP GsB7L1ScIauioJ3nSXAodUaHLjrBnQe7qHRacsuFXycmLCFtx9nCO8uJ7sg0Rgjo JDDf4pA0VEqZIJCfSICT7Yr6F2bUSzEok1smQP3gHIoTgT2rYHW8Kb8grofcZQe5 GW+xoMYph7/oUqgVoCPkpWA= Received: (qmail 10306 invoked by alias); 1 Dec 2015 04:46:05 -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 10289 invoked by uid 89); 1 Dec 2015 04:46:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f182.google.com Received: from mail-ig0-f182.google.com (HELO mail-ig0-f182.google.com) (209.85.213.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 01 Dec 2015 04:46:02 +0000 Received: by igcto18 with SMTP id to18so87922424igc.0 for ; Mon, 30 Nov 2015 20:46:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=fYJ8h8CJ+PchB3INuuVlIzxzqx+Cw122+W0Ls9x1KmU=; b=bx2ioVgLHiibqSO7qkTEB3PTxxZ+ZUU8Om9gtkR3dySn8/1TpqQnQhCLui3X9mCYd1 nyPvIjf5vegu0eeSlkatGzDb17DLhYzBmZMgbhbFvkfiAfXiTEdkz4PZ0eLPZLsRtp2+ brKGcbD3dQtBIAtNbmLamUiq+nZ86uOUkHxR8xZL1ucgOBCXD5k1A744t1tH+9Z6qiAm IzoWmNMzs4AJIiiLRglL66MigbEn9V8e901lGLg3/iF/wqIvqzO9BMNxf1NBx5j0ekap OWaCFi9BfA7YbTFnCTcOIrQhGoFrUlmeMHHRDobknA2lGmJbEZ8dao72EBfml80hWAcY QGsw== X-Gm-Message-State: ALoCoQlzL1IqcK6v2YQII6SxLZ05G9tq5G5wHfR9dwo4tNDqfkk0P4hiiQPClJxUoU2Pmky6FGoh MIME-Version: 1.0 X-Received: by 10.50.73.228 with SMTP id o4mr25298528igv.37.1448945160820; Mon, 30 Nov 2015 20:46:00 -0800 (PST) Received: by 10.107.162.70 with HTTP; Mon, 30 Nov 2015 20:46:00 -0800 (PST) Date: Mon, 30 Nov 2015 20:46:00 -0800 Message-ID: Subject: Go patch committed: Don't set TYPE_STRING_FLAG on a type variant From: Ian Lance Taylor To: gcc-patches , "gofrontend-dev@googlegroups.com" PR 68477 observes that gccgo crashes when using -flto1 because a type variant has TYPE_STRING_FLAG set. So, don't do that. TYPE_STRING_FLAG doesn't really do anything, as far as I can tell, since all the relevant tests in dwarf2out.c also test isfortran(). But, it seems like the right thing to do. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2015-11-30 Ian Lance Taylor PR go/68477 * go-gcc.cc (Gcc_backend::string_constant_expression): Don't set TYPE_STRING_FLAG on a variant type. Index: gcc/go/go-gcc.cc =================================================================== --- gcc/go/go-gcc.cc (revision 230759) +++ gcc/go/go-gcc.cc (working copy) @@ -1279,7 +1279,6 @@ Gcc_backend::string_constant_expression( tree const_char_type = build_qualified_type(unsigned_char_type_node, TYPE_QUAL_CONST); tree string_type = build_array_type(const_char_type, index_type); - string_type = build_variant_type_copy(string_type); TYPE_STRING_FLAG(string_type) = 1; tree string_val = build_string(val.length(), val.data()); TREE_TYPE(string_val) = string_type;