From patchwork Tue Nov 11 10:41:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 409226 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 565AA14017A for ; Tue, 11 Nov 2014 21:42:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; q=dns; s= default; b=VtfqD0axs00d1bD4qtnuCZk/2cG+d3bKnE06sNcfKoqOmLv5/5a0F fSmIKLC+06hlsUyVrHBIC2N0wJ9L9Hjij/hMmKYyXhp0wEV9FRXjhdJ8xyFapxr2 B36CyxLoiRRCeW16i1tkI8/qQD6hAGfsOA6oeOV1YIbTqHOyokYtvs= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=default; bh=ZBKtMbLwxozQNFKgFsx9r2nUWyY=; b=HL/TqYuxt7umK2dOKkQW7Bo/hhvR INZFKytkdUzRQo16M6Pf2r1myKBzjBNIZAbFqie4Fs5wGzt131xvdR/EH/UAaJVM M6lrSN0Y0QYNKP6IGfAdmD6Ww7F8FPpQ1Ny6d79N/zRh5pGBEg76vPx9wrIVSE5d IHm1710GbwdFqdY= Received: (qmail 20893 invoked by alias); 11 Nov 2014 10:41:58 -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 20873 invoked by uid 89); 11 Nov 2014 10:41:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 11 Nov 2014 10:41:55 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sABAfs4S024145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Nov 2014 05:41:54 -0500 Received: from localhost (ovpn-116-136.ams2.redhat.com [10.36.116.136]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sABAfrrp028999; Tue, 11 Nov 2014 05:41:53 -0500 Date: Tue, 11 Nov 2014 10:41:53 +0000 From: Jonathan Wakely To: FX Cc: GCC Patches , Jonathan Wakely , dje.gcc@gmail.com, libstdc++@gcc.gnu.org Subject: Re: libstdc++ new deque failures Message-ID: <20141111104153.GL5191@redhat.com> References: <1FA730B6-5D10-4C6E-BE34-E1259E6B8743@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1FA730B6-5D10-4C6E-BE34-E1259E6B8743@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) On 11/11/14 10:49 +0100, FX wrote: >The patch below break bootstrap on darwin (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63811): > >> Fix std::deque move construction with non-equal allocators. >> >> * include/bits/stl_deque.h (_Deque_base::_Deque_base(_Deque_base&&)): >> Dispatch according to whether allocators are always equal. >> (_Deque_base::_M_move_impl()): Implement move-from state. > > >In file included from /Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/deque:64:0, > from /Users/fx/devel/gcc/trunk2/libstdc++-v3/include/precompiled/stdc++.h:67: >/Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/bits/stl_deque.h: In member function ‘std::_Deque_base<_Tp, _Alloc>::_Deque_impl std::_Deque_base<_Tp, _Alloc>::_M_move_impl()’: >/Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/bits/stl_deque.h:645:17: error: expected primary-expression before ‘__attribute’ > _Tp_alloc_type __attribute((__unused__)) {std::move(__alloc)}; > ^ >make[2]: *** [x86_64-apple-darwin14.0.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 Should be fixed with this renaming. Tested x86_64-linux, committed to trunk. commit 3a81c243672bd721f15bc6320fc7a82e850fc3d8 Author: Jonathan Wakely Date: Tue Nov 11 10:11:09 2014 +0000 PR libstdc++/63811 * include/bits/stl_deque.h (_Deque_base::_M_move_impl()): Avoid using badname. diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index c0052b3..3a1c85d 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -642,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Create a copy of the current allocator. _Tp_alloc_type __alloc{_M_get_Tp_allocator()}; // Put that copy in a moved-from state. - _Tp_alloc_type __unused __attribute((__unused__)) {std::move(__alloc)}; + _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)}; // Create an empty map that allocates using the moved-from allocator. _Deque_base __empty{__alloc}; // Now safe to modify current allocator and perform non-throwing swaps.