[Bug target/52407] sse2 simd uint32_t and int64_t and stack variable initialization

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 28 00:14:00 GMT 2012


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

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-02-27 23:34:33 UTC ---
This looks like an aliasing violation to me:

    vl_t         w;
    int64_t     *p = (int64_t *)&w;
    p[0] = p[1] = x;

Using following code, the test works OK:

  union {
    vl_t w;
    int64_t p[2];
  } z;

  z.p[0] = z.p[1] = x;

  while (m--)
    *u++ = *v++ * z.w;



More information about the Gcc-bugs mailing list