From patchwork Fri Jan 6 12:41:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 90158 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9429381qgi; Fri, 6 Jan 2017 04:41:52 -0800 (PST) X-Received: by 10.84.151.69 with SMTP id i63mr2964878pli.122.1483706512503; Fri, 06 Jan 2017 04:41:52 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id z43si53735115plh.111.2017.01.06.04.41.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 04:41:52 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445535-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445535-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445535-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=K0YYbjTYMjdSQnp3wmTxkeLQ5L1lt3r4xK4mEaS6okyOFwNFJG 51kobAWS7WZ+4ZhgcAJLrWGrLSV2UnyCk5tCJeUwdEqqQPXY0S/7VynsXQCiNrR3 kFQgpUL3AYH1jDsW4A3iwchN8BWwPRUvKid9dCOUvmOpSMaWfiUYZM+Nw= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=QP93JonGxDXNT2eeY2q1ow0aVtI=; b=QJwRuR4dGpOKXi0PlN3a Q0WrbAdc5FN1UpgIjLQGVjTnfpG31kUFH0l+QanmGh7yDrWWWQijQgJ0bhcg84o/ xD3wL3n9rVyJ6GLwq6VetcGH+oyKIGLsSgE3nNdMymEM+12wPHLsDyEwIfedYqOH XXv0FOuu/ljTj7Kaz0QggJg= Received: (qmail 113826 invoked by alias); 6 Jan 2017 12:41:30 -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 113575 invoked by uid 89); 6 Jan 2017 12:41:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=Inheritance, LDFLAGS, ldflags X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 12:41:18 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8435CAAC8; Fri, 6 Jan 2017 12:41:16 +0000 (UTC) To: GCC Patches Cc: Markus Trippelsdorf From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Fix lto-bootstrap (PR bootstrap/79003). Message-ID: <2f762812-0bda-0f35-a397-0bff66f39752@suse.cz> Date: Fri, 6 Jan 2017 13:41:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 X-IsSubscribed: yes Hello. This enables doable LTO bootstrap w/o -disable-werror. First change is mentioned in the PR, second is adding -fno-lto to libdecnumber. Honza told me that proper fix would take more effort as it's an old library. Last needed hunk handles -Wmaybe-uninitialized, as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79003#c4. Patch LTO bootstraps on x86_64-linux-gnu, can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 67a3ccd99963ac19cbaebf17453cb51819c7bf1d Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 5 Jan 2017 17:18:27 +0100 Subject: [PATCH] Fix lto-bootstrap (PR bootstrap/79003). gcc/ChangeLog: 2017-01-05 Martin Liska PR bootstrap/79003 * lra-constraints.c: Rename invariant to lra_invariant. * predict.c (set_even_probabilities): Initialize e to NULL. libdecnumber/ChangeLog: 2017-01-05 Martin Liska PR bootstrap/79003 * Makefile.in: Add -fno-lto to {C,CPP,LD}FLAGS. --- gcc/lra-constraints.c | 9 +++++---- gcc/predict.c | 2 +- libdecnumber/Makefile.in | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 61991280373..5ada67a36ba 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4749,7 +4749,7 @@ lra_constraints_finish (void) /* Structure describes invariants for ineheritance. */ -struct invariant +struct lra_invariant { /* The order number of the invariant. */ int num; @@ -4759,7 +4759,7 @@ struct invariant rtx_insn *insn; }; -typedef struct invariant invariant_t; +typedef lra_invariant invariant_t; typedef invariant_t *invariant_ptr_t; typedef const invariant_t *const_invariant_ptr_t; @@ -4767,7 +4767,7 @@ typedef const invariant_t *const_invariant_ptr_t; static vec invariants; /* Allocation pool for the invariants. */ -static object_allocator *invariants_pool; +static object_allocator *invariants_pool; /* Hash table for the invariants. */ static htab_t invariant_table; @@ -4817,7 +4817,8 @@ static void initiate_invariants (void) { invariants.create (100); - invariants_pool = new object_allocator ("Inheritance invariants"); + invariants_pool + = new object_allocator ("Inheritance invariants"); invariant_table = htab_create (100, invariant_hash, invariant_eq_p, NULL); } diff --git a/gcc/predict.c b/gcc/predict.c index e85573bc51d..f851e14b4ed 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -795,7 +795,7 @@ set_even_probabilities (basic_block bb, hash_set *unlikely_edges = NULL) { unsigned nedges = 0; - edge e; + edge e = NULL; edge_iterator ei; FOR_EACH_EDGE (e, ei, bb->succs) diff --git a/libdecnumber/Makefile.in b/libdecnumber/Makefile.in index 02c327a59c4..2cfc5f48720 100644 --- a/libdecnumber/Makefile.in +++ b/libdecnumber/Makefile.in @@ -31,13 +31,13 @@ ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ -fno-lto WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ -fno-lto INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ -LDFLAGS = @LDFLAGS@ +LDFLAGS = @LDFLAGS@ -fno-lto LIBICONV = @LIBICONV@ PACKAGE = @PACKAGE@ PICFLAG = @PICFLAG@ -- 2.11.0