public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-55940-4-JdoyAgXWR9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55940-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55940

Jakub Jelinek <jakub at gcc dot gnu.org> 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 <jakub at gcc dot gnu.org> 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.


  parent reply	other threads:[~2013-01-15 17:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 11:17 [Bug target/55940] New: " fm3 at os dot inf.tu-dresden.de
2013-01-11 11:23 ` [Bug target/55940] " rguenth at gcc dot gnu.org
2013-01-11 11:27 ` rguenth at gcc dot gnu.org
2013-01-11 11:36 ` rguenth at gcc dot gnu.org
2013-01-15 13:53 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 15:04 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 15:22 ` jakub at gcc dot gnu.org
2013-01-15 15:38 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 16:55 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 16:56 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 16:58 ` fm3 at os dot inf.tu-dresden.de
2013-01-15 17:46 ` jakub at gcc dot gnu.org [this message]
2013-01-15 18:29 ` [Bug target/55940] [4.7/4.8 Regression] " jakub at gcc dot gnu.org
2013-01-15 22:59 ` jakub at gcc dot gnu.org
2013-01-16  8:00 ` [Bug target/55940] [4.7 " jakub at gcc dot gnu.org
2013-01-16  9:01 ` fm3 at os dot inf.tu-dresden.de
2013-01-16  9:16 ` jakub at gcc dot gnu.org
2013-02-01 14:10 ` jakub at gcc dot gnu.org
2013-02-01 14:31 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55940-4-JdoyAgXWR9@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).