This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61292] auto keyword to vector reference generates wrong alignment move (causing runtime segfault)
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 25 May 2014 12:19:02 +0000
- Subject: [Bug c++/61292] auto keyword to vector reference generates wrong alignment move (causing runtime segfault)
- Auto-submitted: auto-generated
- References: <bug-61292-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61292
vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|auto keyword to vector |auto keyword to vector
|reference generates wrong |reference generates wrong
|alignment move |alignment move (causing
| |runtime segfault)
--- Comment #1 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
interesting enough
void add14(float * x, float y, float32x4_t v) {
decltype(auto) k1 = *(float32x4a4_t*)(x);
decltype(auto) k2 = *(float32x4a4_t*)(x);
k1 +=v;
k2 += k1+v;
}
generates
__Z5add14PffU8__vectorf:
LFB5:
vaddps (%rdi), %xmm1, %xmm0
vaddps %xmm0, %xmm0, %xmm0
vaddps %xmm1, %xmm0, %xmm1
vmovups %xmm1, (%rdi)
ret
so c++11 auto is loosing the alignment...
is this "standard" or bug?