From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28956 invoked by alias); 8 Aug 2009 10:41:26 -0000 Received: (qmail 28887 invoked by uid 48); 8 Aug 2009 10:41:12 -0000 Date: Sat, 08 Aug 2009 10:41:00 -0000 Message-ID: <20090808104112.28886.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/40667] [4.4/4.5 Regression] stack frames are generated even with -fomit-frame-pointer In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikulas at artax dot karlin dot mff dot cuni dot cz" 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: 2009-08/txt/msg00795.txt.bz2 ------- Comment #21 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-08-08 10:41 ------- Hmm, it still generates the stack frame (and the alignment itself) when there are structures containing long long and with -malign-double. Example, compile with -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -malign-double: struct s { long long a; int b; }; void f(struct s *x); void g(void) { struct s x; f(&x); } --- the stack is aligned although it doesn't have to be. Output: g: pushl %ebp movl %esp, %ebp andl $-8, %esp subl $20, %esp leal 4(%esp), %eax movl %eax, (%esp) call f leave ret I compile the whole project with -malign-double (so I must use it on all modules, even integer ones, as it's ABI thing) and I compile integer-only parts with -mpreferred-stack-boundary=2. I don't know if you can extend that hack for "structures containing long long" ... but the whole stack alignment thing really needs to be redesigned for gcc-4.5. -- mikulas at artax dot karlin dot mff dot cuni dot cz changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40667