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 tree-optimization/65215] New: [5 Regression] Bswap load miscompilation
Date: Thu, 26 Feb 2015 00:27:00 -0000	[thread overview]
Message-ID: <bug-65215-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65215

            Bug ID: 65215
           Summary: [5 Regression] Bswap load miscompilation
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: jakub at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

Starting with r210843, following testcase is miscompiled on big-endian e.g. at
-O2:
static inline unsigned int
foo (unsigned int x)
{
  return (x >> 24) | ((x >> 8) & 0xFF00) | ((x << 8) & 0xFF0000) | (x << 24);
}

__attribute__((noinline, noclone)) unsigned int
bar (unsigned long *x)
{
  return foo (*x);
}

int
main ()
{
  unsigned long l = foo (0xdeadbeefU) | 0xfeedbea800000000ULL;
  if (bar (&l) != 0xdeadbeefU)
    __builtin_abort ();
  return 0;
}


             reply	other threads:[~2015-02-25 22:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26  0:27 jakub at gcc dot gnu.org [this message]
2015-02-26  0:44 ` [Bug tree-optimization/65215] " jakub at gcc dot gnu.org
2015-02-26 11:07 ` jakub at gcc dot gnu.org
2015-02-26 11:17 ` jakub at gcc dot gnu.org
2015-02-26 11:32 ` jakub at gcc dot gnu.org
2015-02-26 11:36 ` rguenth at gcc dot gnu.org
2015-02-26 11:45 ` jakub at gcc dot gnu.org
2015-02-26 11:45 ` thopre01 at gcc dot gnu.org
2015-02-26 12:28 ` thopre01 at gcc dot gnu.org
2015-02-26 12:37 ` jakub at gcc dot gnu.org
2015-02-26 12:39 ` rguenth at gcc dot gnu.org
2015-02-26 12:46 ` rguenth at gcc dot gnu.org
2015-02-26 22:50 ` jakub at gcc dot gnu.org
2015-02-27  0:21 ` 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-65215-4@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).