public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65215] New: [5 Regression] Bswap load miscompilation
@ 2015-02-26  0:27 jakub at gcc dot gnu.org
  2015-02-26  0:44 ` [Bug tree-optimization/65215] " jakub at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-26  0:27 UTC (permalink / raw)
  To: gcc-bugs

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;
}


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-02-26 21:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26  0:27 [Bug tree-optimization/65215] New: [5 Regression] Bswap load miscompilation jakub at gcc dot gnu.org
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

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).