From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6204 invoked by alias); 23 Jul 2009 11:13:12 -0000 Received: (qmail 5930 invoked by uid 48); 23 Jul 2009 11:12:49 -0000 Date: Thu, 23 Jul 2009 11:13:00 -0000 Message-ID: <20090723111249.5929.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-07/txt/msg01850.txt.bz2 ------- Comment #15 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-23 11:12 ------- The patch just walks around the problem and doesn't really fix it. It is simply a hack that disables frame generation for long long, while for the other types the same problem persists: Example: void g(double); int f(double a) { g(a); return 0; } (compile with -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2) --- here it still generates stack frame although it doesn't have to. Gcc 4.3 is correct. Stack frame needs to be generated if * the user requests it (no -fomit-frame-pointer) * there is alloca * there is stack realignment needed (either because of attribute that requests it or SSE variables are on the stack) --- in the above example, none of these three conditions are true, frame is not realigned, yet the frame pointer is generated. The logic for deciding whether to generate the frame pointer is flawed. The current double regression is not as "critical" as the long long but it is still incorrect. -- 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