> /usr/local/gcc43/bin/gcc -O3 -fno-pic -fomit-frame-pointer -m64 -S gcc-struct-stores.i -v Using built-in specs. Target: i386-apple-darwin8.10.1 Configured with: ../gcc/configure --prefix=/usr/local/gcc43 --with-arch=nocona --with-tune=nocona --with-gmp=/sw --with-system-zlib --enable-languages=c,c++,objc,obj-c++ --disable-bootstrap Thread model: posix gcc version 4.3.0 20071008 (experimental) (GCC) GCC updates c->low and c->range in the middle of the function: movl %r8d, (%rdi) movl %edx, 4(%rdi) but they're overwritten at the end: movl %edx, 4(%rdi) sall %cl, (%rdi) I don't know if there are aliasing issues, but marking it __restrict doesn't affect it.
Created attachment 14328 [details] source
Created attachment 14329 [details] resulting x86-64 asm /usr/local/gcc43/bin/gcc -O3 -fno-pic -fomit-frame-pointer -m64 -S gcc-struct-stores.i
> I don't know if there are aliasing issues, but marking it __restrict doesn't affect it. It is as changing state to be uint32_t and add restrict to both arguments makes it work correctly. The issue here is that we say character types alias everything even stuff which have restrict on them.
Created attachment 15502 [details] source with __restrict (no change)
This is because restrict is implemented as regular alias-sets. *** This bug has been marked as a duplicate of 14187 ***