From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50258 invoked by alias); 8 Apr 2015 16:22:15 -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 50221 invoked by uid 89); 8 Apr 2015 16:22:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 08 Apr 2015 16:22:13 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 36F49540E54; Wed, 8 Apr 2015 18:22:10 +0200 (CEST) Date: Wed, 08 Apr 2015 16:22:00 -0000 From: Jan Hubicka To: Jason Merrill Cc: Jakub Jelinek , Jan Hubicka , gcc-patches@gcc.gnu.org Subject: Re: [C++ PATCH] Fix alignment handling in build_cplus_array_type/cp_build_qualified_type_real (PR c++/65690) Message-ID: <20150408162209.GC27929@kam.mff.cuni.cz> References: <20150408100239.GO19273@tucnak.redhat.com> <55253F73.1000902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55253F73.1000902@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-04/txt/msg00327.txt.bz2 > On 04/08/2015 06:02 AM, Jakub Jelinek wrote: > > (cp_build_qualified_type_real): Use check_base_type. Build a > > variant and copy over even TYPE_CONTEXT and > > TYPE_ALIGN/TYPE_USER_ALIGN if any of those are different. > > This seems wrong. If there is an array with the same name, > attributes and element type, it should have the same alignment; if One of problems is that cp_build_qualified_type rebuilds the array from scratch and never copies the attribute list around (as oposed to build_qualified_type that just memcpy the type node) Honza > it doesn't, that probably means that one of the types hasn't been > laid out yet. We don't want to have two variants of the same array > that are distinguished only by whether they've been laid out, > especially since later probably both will be laid out and the two > types will be the same. > > Jason