From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58881 invoked by alias); 8 Apr 2015 16:28:03 -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 58863 invoked by uid 89); 8 Apr 2015 16:28:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Wed, 08 Apr 2015 16:28:02 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t38GS0Ya010547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Apr 2015 12:28:00 -0400 Received: from tucnak.zalov.cz (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t38GRwxL013558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Apr 2015 12:28:00 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t38GRvl5030976; Wed, 8 Apr 2015 18:27:57 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t38GRuc1030975; Wed, 8 Apr 2015 18:27:56 +0200 Date: Wed, 08 Apr 2015 16:28:00 -0000 From: Jakub Jelinek To: Jan Hubicka Cc: Jason Merrill , 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: <20150408162756.GU19273@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150408100239.GO19273@tucnak.redhat.com> <55253F73.1000902@redhat.com> <20150408162209.GC27929@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150408162209.GC27929@kam.mff.cuni.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00328.txt.bz2 On Wed, Apr 08, 2015 at 06:22:10PM +0200, Jan Hubicka wrote: > > 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) As I said earlier, TYPE_ATTRIBUTES is NULL here anyway, because the attributes hang in DECL_ATTRIBUTES of TYPE_DECL. And, except for config/sol2.c (which looks wrong), nothing ever calls lookup_attribute for "aligned" anyway, the user aligned stuff is encoded in TYPE_USER_ALIGN and/or DECL_USER_ALIGN and TYPE_ALIGN/DECL_ALIGN. Jakub