https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127433

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> It works for me.  But
> 
>   const uint64_t* pComp_cur = reinterpret_cast<const uint64_t*>(pComp);
> 
> is unaligned and you dereference it, so I think this is UB and GCC is
> correct to infer the accesses are aligned to 8 bytes at least and
> assume that when attempting to ensure mutual alignment.


/app/example.cpp:14:9: runtime error: load of misaligned address 0x0000004043e1
for type 'const uint64_t', which requires 8 byte alignment
0x0000004043e1: note: pointer points here
 c0 cd da  e7 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00
00 00  00 00 00 00 00
              ^ 
/app/example.cpp:14:23: runtime error: load of misaligned address
0x000000404421 for type 'const uint64_t', which requires 8 byte alignment
0x000000404421: note: pointer points here
 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00
00 00  00 00 00 00 00
              ^ 
buf_addr_mod32=0 pos97_mod32=1 pos161_mod32=1

Reply via email to