From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8749 invoked by alias); 20 Mar 2002 09:57:58 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8711 invoked by uid 61); 20 Mar 2002 09:57:57 -0000 Date: Wed, 20 Mar 2002 01:57:00 -0000 Message-ID: <20020320095757.8710.qmail@sources.redhat.com> To: Daniel.Diaz@univ-paris1.fr, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: jakub@gcc.gnu.org Reply-To: jakub@gcc.gnu.org, Daniel.Diaz@univ-paris1.fr, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org X-Mailer: gnatsweb 2.9.3 Subject: Re: optimization/6004: gcc 3.0.4 always compiles main() with frame (and ebp) even with -fomit-frame-pointer and -ffixed-ebp X-SW-Source: 2002-03/txt/msg00746.txt.bz2 List-Id: Synopsis: gcc 3.0.4 always compiles main() with frame (and ebp) even with -fomit-frame-pointer and -ffixed-ebp State-Changed-From-To: open->analyzed State-Changed-By: jakub State-Changed-When: Wed Mar 20 01:57:57 2002 State-Changed-Why: -fomit-frame-pointer documentation sais: Don't keep the frame pointer in a register for functions that don't need one, ... which means the compiler makes no guarantees it will be actually eliminated. Particularly main if it aligns the stack pointer. You might try gcc -O2 -fomit-frame-pointer -ffixed-ebp -mpreferred-stack-boundary=2 x.c for the .c file containing main. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6004