From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30639 invoked by alias); 9 Apr 2003 22:40:24 -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 30632 invoked from network); 9 Apr 2003 22:40:24 -0000 Received: from unknown (HELO faui11.informatik.uni-erlangen.de) (131.188.31.2) by sources.redhat.com with SMTP; 9 Apr 2003 22:40:24 -0000 Received: (from weigand@localhost) by faui11.informatik.uni-erlangen.de (8.9.1/8.1.4-FAU) id AAA21282; Thu, 10 Apr 2003 00:40:21 +0200 (MET DST) From: Ulrich Weigand Message-Id: <200304092240.AAA21282@faui11.informatik.uni-erlangen.de> Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT To: rth@redhat.com Date: Wed, 09 Apr 2003 23:31:00 -0000 Cc: gcc@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00401.txt.bz2 Hello Richard, I wrote: >My question is now, why is DATA_ALIGNMENT ignored in such cases? >Is this a bug or a feature? If the latter, what other options does >a backend have to absolutely enforce a minimum alignment for global >variables? checking CVS logs showed that this is apparently a feature, introduced in a patch of yours a couple of years ago: http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01037.html ("suppress optional alignment for user variables"). However, the problem remains that on s390, the alignment is not in fact 'optional' but a hard requirement. (Looking at the various implementations of DATA_ALIGNMENT, it seems that mmix also needs this to be handled as required, while for the others it is indeed optional.) I'm now wondering what we can do to fix this. One way might be to add another target macro; or else we could shift the burden to distinguish between optional and required alignments into the DATA_ALIGNMENT macro: the macro gets the type as parameter, and the backend can check whether the USER_ALIGN is bit is set and if so, only perform mandatory, not optional, alignment adjustments. Would you agree with this or do you have other suggestions? Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de