From patchwork Wed Nov 23 16:13:58 2016 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: 83709 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2721085qge; Wed, 23 Nov 2016 08:14:30 -0800 (PST) X-Received: by 10.84.142.131 with SMTP id 3mr8166779plx.124.1479917670310; Wed, 23 Nov 2016 08:14:30 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j62si34503305pfk.288.2016.11.23.08.14.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 08:14:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-442404-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-442404-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-442404-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 :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=PA00K1Lyijz3N8ffSqeLDm0APXoOtYiDYbPk3jRDcr39xEGlbY 07rJKdKNJlRrCKXcP05GZb874U/FWR+XkzeMz/BNct9rG8kpL36SPybLf7U1S6Ll +RRPrtoE78/gtdyNEEci8m9StL8wgOm+3oOL24inwajzRG/8rUDPmmkTA= 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 :from:subject:message-id:date:mime-version:content-type; s= default; bh=j2BuL/R0aH2vguKOqgp951ICzes=; b=Qg0BQxmlm4Fpr4m4tKd5 CaDZN3nYxLZKPoqRW6+lDRbViKB1seIuoOH81/7Kzf3IZpmu6ogq95u9txBGVjcR bJ/c2wNzUV6fnR3iSKX5sbeH0/u8LWUXPiT3xEZsbF7FhdSn2eCrLDJ/meDcXC5C LH6onLZFda0iwJ9ZsmItDaI= Received: (qmail 130114 invoked by alias); 23 Nov 2016 16:14:13 -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 130089 invoked by uid 89); 23 Nov 2016 16:14:12 -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= 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; Wed, 23 Nov 2016 16:14:02 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 05D77ABC7 for ; Wed, 23 Nov 2016 16:14:00 +0000 (UTC) To: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Fix PR bootstrap/78493 Message-ID: Date: Wed, 23 Nov 2016 17:13:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-IsSubscribed: yes Hello. As described in the PR, the patch fixes profiled bootstrap on x86_64-linux-gnu. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. And profiled bootstrap on x86_64-linux-gnu finishes successfully. Ready to be installed? Martin >From 8b7cd9a83cd14f7a15f39e105ccd78e143ec84f2 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 23 Nov 2016 14:08:52 +0100 Subject: [PATCH] Fix PR bootstrap/78493 gcc/ChangeLog: 2016-11-23 Martin Liska PR bootstrap/78493 * vec.h (~auto_vec): Do va_heap::release just if this->m_vec == &m_auto. That would help compiler not to trigger -Werror=free-nonheap-object. --- gcc/vec.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/vec.h b/gcc/vec.h index 14fb2a6..d2d253b 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1272,7 +1272,14 @@ public: ~auto_vec () { - this->release (); + if (this->m_vec == &m_auto) + { + gcc_checking_assert (this->using_auto_storage ()); + this->m_vec->m_vecpfx.m_num = 0; + return; + } + + va_heap::release (this->m_vec); } private: -- 2.10.2