From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1627 invoked by alias); 20 Jan 2009 05:00:31 -0000 Received: (qmail 1562 invoked by uid 48); 20 Jan 2009 05:00:16 -0000 Date: Tue, 20 Jan 2009 05:00:00 -0000 Message-ID: <20090120050016.1561.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/38587] [4.4 Regression] psim miscompiled #2 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: 2009-01/txt/msg02164.txt.bz2 ------- Comment #21 from hjl dot tools at gmail dot com 2009-01-20 05:00 ------- (In reply to comment #20) > The problem may something to do with > > setjmp > ... > while (1) > { > foo (); // foo calls longjmp and foo is inlined. > } > The problem is if (setjmp (buf)) { /* Restore registers from stack. */ } while (1) { bar (); /* Reuse stack slots used to restore registers after longjmp. */ foo (); /* Call longjmp. */ } IRA should avoid reusing stack slots used to restore registers after longjmp. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587