From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10377 invoked by alias); 10 Apr 2003 22:08:48 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10332 invoked from network); 10 Apr 2003 22:08:47 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 10 Apr 2003 22:08:47 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id h3ALxIZ04619; Thu, 10 Apr 2003 17:59:18 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3AM8jW17333; Thu, 10 Apr 2003 18:08:46 -0400 Received: from dot.sfbay.redhat.com (dot.sfbay.redhat.com [172.16.24.7]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h3AM8j521022; Thu, 10 Apr 2003 15:08:45 -0700 Received: (from rth@localhost) by dot.sfbay.redhat.com (8.11.6/8.11.6) id h3AM6OK04404; Thu, 10 Apr 2003 15:06:24 -0700 X-Authentication-Warning: dot.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Thu, 10 Apr 2003 22:24:00 -0000 From: Richard Henderson To: Richard Kenner Cc: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT Message-ID: <20030410220624.GE4350@redhat.com> Mail-Followup-To: Richard Henderson , Richard Kenner , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org References: <10304102149.AA03328@vlsi1.ultra.nyu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10304102149.AA03328@vlsi1.ultra.nyu.edu> User-Agent: Mutt/1.4i X-SW-Source: 2003-04/txt/msg00487.txt.bz2 On Thu, Apr 10, 2003 at 05:49:40PM -0400, Richard Kenner wrote: > Why? It seems like what it means is "the alignment of this type was set the > way it is for a reason. Please don't change it." And that applies here. I'll concede that there's still too much language-specific widgetry in layout_type, which causes you to want to set such a flag, but that's as far as I'm willing to go. Perhaps the short-term solution is as you suggest -- a new lang hook such that Ada can avoid setting DECL_USER_ALIGN when the languages allows a larger alignment to be used for particular objects. I definitely think the bug is *not* in varasm.c. If I write "double x __attribute__((aligned(1)))", I expect to see .comm x,8,1 not .comm x,8,8 in the assembly file. I do like Ulrich's change to the s390x backend to cope with variables explicitly declared with 1 byte alignment. I definitely think there's a bug in that the Ada front end sets DECL_USER_ALIGN for these objects and the C front end (in response to the auto-generated files) does not. That mis-match should be addressed in some way -- either by not setting DECL_USER_ALIGN in Ada or by tagging the variables with attribute aligned in C. I think it's clear that the former solution would be preferred, since it would result in better code for this platform. But this is up to yall. r~