From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15588 invoked by alias); 15 Jan 2013 17:46:17 -0000 Received: (qmail 15409 invoked by uid 48); 15 Jan 2013 17:45:49 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55940] [4.7/4.8 Regression] Incorrect code for accessing parameters with 32-bit Intel hosts Date: Tue, 15 Jan 2013 17:46: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.3 X-Bugzilla-Changed-Fields: Status Target Milestone Summary 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: 2013-01/txt/msg01397.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55940 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Target Milestone|--- |4.7.3 Summary|Incorrect code for |[4.7/4.8 Regression] |accessing parameters with |Incorrect code for |32-bit Intel hosts |accessing parameters with | |32-bit Intel hosts --- Comment #11 from Jakub Jelinek 2013-01-15 17:45:48 UTC --- Sounds like shrink-wrapping bug to me: /* { dg-options "-Os" } */ /* { dg-additional-options "-mpreferred-stack-boundary=2" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ struct S { int s; unsigned long t; }; __attribute__ ((visibility ("hidden"))) unsigned long long bar (struct S *x, unsigned long y); unsigned long long foo (struct S *x, unsigned long y) { unsigned long a; if (__builtin_expect (((unsigned long) (x) + 0x1000U < 0x2000U), 0)) return ~0ULL; if (__builtin_expect (x->s <= 0 || x->s > 9, 0)) return ~0ULL; a = x->t >> 12; if (y >= a && y == a) return ~0ULL; if (x->s == 3) return x->t + y * 4096; return bar (x, y); } The pre-prologue code can't use registers initialized in the prologue.