This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52407] sse2 simd uint32_t and int64_t and stack variable initialization
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Feb 2012 23:34:33 +0000
- Subject: [Bug target/52407] sse2 simd uint32_t and int64_t and stack variable initialization
- Auto-submitted: auto-generated
- References: <bug-52407-4@http.gcc.gnu.org/bugzilla/>
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;