public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
@ 2014-11-15 20:24 fxcoudert at gcc dot gnu.org
  2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-15 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63897
           Summary: [5.0 regression] gcc.dg/torture/vector-2.c fails at on
                    x86_64-apple-darwin14
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org

Created attachment 33987
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33987&action=edit
Assembler generated by "gcc -msse vector-2.c -O1 -m32 -S"

gcc.dg/torture/vector-2.c currently fails on trunk, when compiled with "-msse
vector-2.c -O1 -m32". Here is a minimal reproducer:

----------------------------
#define vector __attribute__((vector_size(16) ))

vector int f0(vector int t)
{
 ((int*)&t)[0] = 1;
 return t;
}
vector int f1(vector int t)
{
 ((int*)&t)[1] = 1;
 return t;
}

int main(void)
{
  vector int a = {0, 0, 0, 0};
  vector int b = {1, 0, 0, 0};
  vector int c = {0, 1, 0, 0};
  vector int a0 = f0(a);
  if (__builtin_memcmp (&a0, &b, sizeof(a0)))
    __builtin_abort ();
  a0 = f1(a);
  if (__builtin_memcmp (&a0, &c, sizeof(a0)))
    __builtin_abort ();
  return 0;
}
----------------------------


When compiled with "gcc -msse vector-2.c -O1 -m32", this segfaults at runtime.
The backtrace is:

* thread #1: tid = 0xdc2a68, 0x00001ea9 a.out`main + 81, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xb0)
    frame #0: 0x00001ea9 a.out`main + 81
a.out`main + 81:
-> 0x1ea9:  movd   0xb0(%eax), %xmm0
   0x1eb1:  pshufd $-0x1f, %xmm0, %xmm0
   0x1eb6:  movaps %xmm0, 0x10(%esp)
   0x1ebb:  subl   $0x4, %esp

The assembler generated is attached.


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

end of thread, other threads:[~2014-11-21 21:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
2014-11-15 21:01 ` dominiq at lps dot ens.fr
2014-11-15 21:06 ` fxcoudert at gcc dot gnu.org
2014-11-15 22:03 ` dominiq at lps dot ens.fr
2014-11-15 23:03 ` dominiq at lps dot ens.fr
2014-11-17  9:13 ` rguenth at gcc dot gnu.org
2014-11-17 12:51 ` izamyatin at gmail dot com
2014-11-20 15:32 ` vmakarov at gcc dot gnu.org
2014-11-21 21:30 ` vmakarov 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).