[Bug rtl-optimization/45678] [4.4/4.5/4.6 Regression] crash on vector code with -m32 -msse

hjl dot tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 16 13:02:00 GMT 2010



------- Comment #8 from hjl dot tools at gmail dot com  2010-09-16 13:02 -------
This also failed:

---
typedef float V __attribute__ ((vector_size (16)));
V g;
float d[4] = { 4, 3, 2, 1 };

int
main ()
{
  V e;
  __builtin_memcpy (&e, &d, sizeof (d));
  V f = { 5, 15, 25, 35 };
  e = e * f;
  g = e;
  return 0;
}
---

Program received signal SIGSEGV, Segmentation fault.
0x0804837e in main () at foo.c:11
11        e = e * f;
Missing separate debuginfos, use: debuginfo-install glibc-2.12.1-2.0.f13.i686
(gdb) disass
Dump of assembler code for function main:
   0x08048374 <+0>:     push   %ebp
   0x08048375 <+1>:     mov    %esp,%ebp
   0x08048377 <+3>:     movaps 0x8048470,%xmm0
=> 0x0804837e <+10>:    mulps  0x8049644,%xmm0
   0x08048385 <+17>:    movaps %xmm0,0x8049670
   0x0804838c <+24>:    mov    $0x0,%eax
   0x08048391 <+29>:    pop    %ebp
   0x08048392 <+30>:    ret    
End of assembler dump.
(gdb) q

There is no stack involved. Somehow we failed to align
array of float properly.


-- 


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



More information about the Gcc-bugs mailing list