From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 332 invoked by alias); 11 Aug 2009 21:01:29 -0000 Received: (qmail 29058 invoked by uid 48); 11 Aug 2009 21:01:05 -0000 Date: Tue, 11 Aug 2009 21:01:00 -0000 Message-ID: <20090811210105.29057.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/msg00984.txt.bz2 ------- Comment #24 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-08-11 21:01 ------- Another case when stack frame is spuriously generated: /* -O2 -fomit-frame-pointer -mno-accumulate-outgoing-args */ void __attribute__((__noreturn__)) crash(__const__ char *, ...); void F(int *q) { while (1) { if (*q < 0) crash("buuu"); if (!*q) break; q++; } } --- stack frame is generated for no apparent reason. The switch that actually does it is -ftree-ch (with -fno-tree-ch, the stack frame is not generated). This is not misgenerated code byt it may indicate that something bad is going on in the compiler. The conditions are very peculiar ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40667