------- Comment #5 from mkuvyrkov at gcc dot gnu dot org 2006-03-16 20:32 ------- (In reply to comment #3) > It may be related to > > http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01001.html > http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01000.html > http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00999.html > http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00997.html > http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00998.html > > Maxim, can you verify that? >
I've tested the mainline r18717 (the one just before my patches) on the strncpy-chk.x2 test and it reported the same unalligned access. The unalligned access itself is due to store of a char as an int: ;; (insn 170 ...) add r38 = r12, 17 ;; r12 is a stack pointer. ... ;; (insn 172 ...) st4 [r38] = r37 ;; unalligned store. I don't know which pass is responsible to eliminate unalligned references, but it seems to me that that pass skips this one case. BTW, the very first rtl dump .expand has the same instructions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26721