Weird warning

Florian Weimer fw@deneb.enyo.de
Thu Nov 10 19:21:00 GMT 2016


* Marcel Keller:

> I've been digging a bit deeper after making sense of the warning. It 
> seems that GCC simply misaligns __m256i values. In the attached example, 
> the unaligned load/store works fine but the last line fails. The address 
> in the output clearly shows that the memory is not aligned (not 
> divisible by 32):
>
> 0x7ffff7f83010
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004008d0 in main () at avx-bug.cpp:17
> 17	  v[0].a[0] = v[0].a[0];

Yes, this is a known issue.  It has been fixed in GCC 7:

  <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122>



More information about the Gcc-help mailing list