From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26801 invoked by alias); 6 Feb 2012 09:47:17 -0000 Received: (qmail 26790 invoked by uid 22791); 6 Feb 2012 09:47:17 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Feb 2012 09:47:04 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52129] wrong code to pass parameters to tail call function Date: Mon, 06 Feb 2012 09:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed AssignedTo Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-02/txt/msg00578.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52129 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-02-06 AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #2 from Jakub Jelinek 2012-02-06 09:46:59 UTC --- Created attachment 26580 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26580 gcc47-pr52129.patch Untested fix. Seems on this testcase pretend_args_size is non-zero, and argblock is initialized for sibcall sequences as: argblock = crtl->args.internal_arg_pointer; argblock #ifdef STACK_GROWS_DOWNWARD = plus_constant (argblock, crtl->args.pretend_args_size); #else = plus_constant (argblock, -crtl->args.pretend_args_size); #endif and what is stored into stored_args_map is relative to that argblock (arg->locate.slot_offset.constant based), while the testing is done with offsets relative to crtl->args.internal_arg_pointer.