From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32759 invoked by alias); 12 Dec 2008 01:06:53 -0000 Received: (qmail 32444 invoked by uid 48); 12 Dec 2008 01:05:33 -0000 Date: Fri, 12 Dec 2008 01:06:00 -0000 Message-ID: <20081212010533.32443.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/38496] Gcc misaligns arrays when stack is forced follow the x8632 ABI In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01298.txt.bz2 ------- Comment #9 from hjl dot tools at gmail dot com 2008-12-12 01:05 ------- (In reply to comment #8) > > This is a link where people mention that fact that gcc is behaving > non-standardly, so people who want to interoperate with gcc better adopt their > non-standard behavior. How do you like it when MS does that? It seems > incredibly foolish to me that just because gcc doesn't want to do some trivial > bit twiddling in the function prologue, you've decided to break the ABI, all so > that you can lose performance when people need ABI compliance, as well as > making interoperation much harder for everyone. > It was a very unfortunate oversight to require 16byte stack alignment while ABI only specifies 4 byte. This problem has been fixed in gcc 4.4 and above. You can safely use -mpreferred-stack-boundary=2 with gcc 4.4 and all stack variables will be properly aligned. However, we can't change the default back to 4 byte since it will break the existing libraries/applications which expect 16byte aligned incoming stack. -- hjl dot tools at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl dot tools at gmail dot | |com OtherBugsDependingO| |33721 nThis| | Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496