http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57295
--- Comment #2 from Wojciech Migda <wojtek.golf at interia dot pl> --- Created attachment 32261 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32261&action=edit Proposed patch Analysis of the reported problem has shown that expanding movmisalign instruction did not take into account volatile memory access. I cloned the volatile_mem_operand predicate from RS6000 and applied it in c6x.md. To verify that it works I've created six testcases. Four of the should generate misaligned store insn, two should generate regular store. Due to another bug in some other part of gcc rtl generated for one of the testcases is wrong - it assumes aligned access instead of a misaligned one, hence I commented it out so for now there will be five testcases in operation. Host: Linux wmigda-desktop 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 i686 i686 i686 GNU/Linux Target: tic6x-none-elf Results for the new testcases (run with make check-gcc RUNTESTFLAGS="CFLAGS_FOR_TARGET='$CFLAGS_FOR_TARGET --sysroot=${CXTOOLS}${TRIPLET}/sysroot' -v -v tic6x.exp") PASS: gcc.target/tic6x/misaligned-store.c (test for excess errors) PASS: gcc.target/tic6x/misaligned-store.c scan-assembler-times stnw 3 PASS: gcc.target/tic6x/misaligned-store.c scan-assembler-times stw 2