From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2858 invoked by alias); 5 Apr 2017 20:18:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2840 invoked by uid 89); 5 Apr 2017 20:18:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy= X-HELO: mail-io0-f170.google.com Received: from mail-io0-f170.google.com (HELO mail-io0-f170.google.com) (209.85.223.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 20:18:17 +0000 Received: by mail-io0-f170.google.com with SMTP id b140so17435425iof.1 for ; Wed, 05 Apr 2017 13:18:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7xrFj8quRIbKMSekDAwiVzJAmCD8iI+FipZ/fDXdihY=; b=nlZck5Kk2N7aiXaGYIoZGNup4jJnc6ANP+/x+7VmVjpxX8/w854wfNRAozEGewB/iv ar6VXG1AuFzLPEb4MNK7ffpoCLDYpRu2kwV4PrBteGLM07LvZccfwLcJwvwOYvhZ+xiE Fb+w9eDLrdQ286f04HLTqbnTFdeipddO5A+mQOi4ZScJH7mFgf2OTFe/l6lXLzwjypS+ bf38ZI7lUKT5jBSip1H6dP5ioJEyORB34YiewlWpXJOk+9SzjDJoRh3A+DPUml3Rj74l mtj7w7ffb5rNpfYtP6sx4NfDx1oJJNnv8SdVVK1xGERaGPOSf5hW0TO012Y63TB93MvA 8RCQ== X-Gm-Message-State: AFeK/H0pHwQJRF+QHp0GpK/rJ3o7bX+xiXO10xDt4S9TKiMcDFt7JpfGtcC5EfRh+zHcwqhO1d/urFp+hdClHQAW X-Received: by 10.107.7.14 with SMTP id 14mr28240320ioh.5.1491423497022; Wed, 05 Apr 2017 13:18:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.136.194 with HTTP; Wed, 5 Apr 2017 13:17:56 -0700 (PDT) In-Reply-To: References: <20170405132832.GS17461@tucnak> From: Jason Merrill Date: Wed, 05 Apr 2017 20:18:00 -0000 Message-ID: Subject: Re: [PATCH] Add a new type attribute always_alias (PR79671) To: Bernd Edlinger Cc: Richard Biener , Jakub Jelinek , GCC Patches , Marc Glisse , Jonathan Wakely , Jeff Law Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00249.txt.bz2 On Wed, Apr 5, 2017 at 1:41 PM, Bernd Edlinger wrote: > On 04/05/17 17:20, Richard Biener wrote: >>> Also, wonder if you need to mark all types containing such arrays, >>> if you couldn't just set that flag in C++ on unsigned char/std::byte >>> arrays (and on anything with that attribute), have that imply alias set >>> 0 on it and then let the rest of alias machinery handle aggregate types >>> containing such fields. >> >> Yes, I expected it to work like this (didn't look at the patch yet). My impression is that this is how GCC 6 worked, but GCC 7 decides to ignore alias set 0 members. Is that right? > I want to allow *only* what the C++ standard requires or what Jason says > of course :), and not a single bit more, because it suppresses otherwise > correct optimizations. > > So a struct with a std::byte member is not alias_set 0, > only the std::byte itself is, but an array of std::byte > is itself typeless_storage, and makes the whole structure > also typeless_storage Well, only the array member, not the whole structure, but it may make sense for GCC to treat the whole structure as such internally. Jason