From patchwork Mon Apr 13 04:45:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 460622 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 F256A1402E8 for ; Mon, 13 Apr 2015 14:45:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=rHg/+Or1; dkim-adsp=none (unprotected policy); 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:date :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=Z1v kLKa6+IX32es0NtwekVmXAZ7chei4AXI6xZFkm6ET1noH8r2vUNgDrh/TRFeHAYI nuZ2Y+vQJznISaT5jRQ6jmWcnwFL1SLP2K2G6pAy/PbSS6OSX2jVia5QTYjLxee9 A/hZ+Cp/QcOiGOimy5oB3liST7gwJJKJa6c+CJPI= 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 :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; s=default; bh=tn0GIXNzS lFRnKV/J2THytdD9i4=; b=rHg/+Or1hVgjM046lqStx8mWMayvNBu2STLBc9qdm 3qMCT94zo2HLRgJR9HPdILEAg52jp1+EGBaPcROyxuwYnvAJMKVDDPMVSOA6vCkn CSVPaXlzi3oBnuGqNzQu30cn0K0/eAoZePBgqJEXxo8FdfW1JTytO5dBTNnnBO+v XA= Received: (qmail 91315 invoked by alias); 13 Apr 2015 04:45: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 91280 invoked by uid 89); 13 Apr 2015 04:45:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: bastet.se.axis.com Received: from bastet.se.axis.com (HELO bastet.se.axis.com) (195.60.68.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Apr 2015 04:45:40 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 3E8C118086; Mon, 13 Apr 2015 06:45:37 +0200 (CEST) Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id Hl5JlDhZWqsC; Mon, 13 Apr 2015 06:45:36 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bastet.se.axis.com (Postfix) with ESMTP id 9C62818084; Mon, 13 Apr 2015 06:45:36 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 7D1771254; Mon, 13 Apr 2015 06:45:36 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id 718FD11AE; Mon, 13 Apr 2015 06:45:36 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id 6E3C234005; Mon, 13 Apr 2015 06:45:36 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id t3D4jZBc003367; Mon, 13 Apr 2015 06:45:36 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id t3D4jZ24003363; Mon, 13 Apr 2015 06:45:35 +0200 Date: Mon, 13 Apr 2015 06:45:35 +0200 Message-Id: <201504130445.t3D4jZ24003363@ignucius.se.axis.com> From: Hans-Peter Nilsson To: jwakely@redhat.com CC: rth@redhat.com, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org, amacleod@redhat.com In-reply-to: <20150326132147.GL9755@redhat.com> (message from Jonathan Wakely on Thu, 26 Mar 2015 14:21:47 +0100) Subject: patch fix issue 1 with "[libstdc++/65033] Give alignment info to libatomic" MIME-Version: 1.0 > PR libstdc++/62259 > PR libstdc++/65147 > * include/std/atomic (atomic): Increase alignment for types with > the same size as one of the integral types. > * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number. > * testsuite/29_atomics/atomic/62259.cc: New. Ever since aligmnent was made sane-ish, 62259.cc has failed for reasons obvious in the patch. Can I please commit this? * testsuite/29_atomics/atomic/62259.cc: Assert atomic alignment is larger-equal, not equal, to default alignment. brgds, H-P Index: libstdc++-v3/testsuite/29_atomics/atomic/62259.cc =================================================================== --- libstdc++-v3/testsuite/29_atomics/atomic/62259.cc (revision 222036) +++ libstdc++-v3/testsuite/29_atomics/atomic/62259.cc (working copy) @@ -33,7 +33,7 @@ struct twoints { int32_t b; }; -static_assert( alignof(std::atomic) == alignof(int64_t), +static_assert( alignof(std::atomic) >= alignof(int64_t), "std::atomic not suitably aligned" ); // libstdc++/65147 @@ -44,7 +44,7 @@ struct power_of_two_obj { std::atomic obj1; -static_assert( alignof(obj1) == alignof(int64_t), +static_assert( alignof(obj1) >= alignof(int64_t), "std::atomic not suitably aligned" ); struct container_struct { @@ -54,5 +54,5 @@ struct container_struct { container_struct obj2; -static_assert( alignof(obj2.ao) == alignof(int64_t), +static_assert( alignof(obj2.ao) >= alignof(int64_t), "std::atomic not suitably aligned" );