From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1028 invoked by alias); 27 Jul 2011 11:40:59 -0000 Received: (qmail 1018 invoked by uid 22791); 27 Jul 2011 11:40:58 -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; Wed, 27 Jul 2011 11:40:37 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49866] New: [4.6 Regression] -mcmodel=large tail call fails to assemble X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 27 Jul 2011 11:40:00 -0000 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: 2011-07/txt/msg02330.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49866 Summary: [4.6 Regression] -mcmodel=large tail call fails to assemble Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org CC: uros@gcc.gnu.org Target: x86_64-linux void fn (void *, int, int); int fn2 (void); void baz (int); static void foo (void *x, int y) { int i; for (i = 0; i < y; i++) fn (x, fn2 (), i); } void bar (int u, int v, int w, void *x) { baz (u); foo (x, w); baz (u); } gcc -O2 -mcmodel=large -c rh725516.c fails to assemble, we end up with jmp *$baz This got fixed on the trunk with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173797 but for the backport it would be certainly preferrable if we got a smaller and less riskier fix than that. In r166110 it was (likely incorrectly for large model, but at least it assembled) emitting jmp baz, I expect the change came with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166119