https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Target|ARM |arm --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Does -fno-store-merging fix it? store-merging currently does unsigned HOST_WIDE_INT align = split_store->align; tree offset_type = get_alias_type_for_stmts (split_store->orig_stmts); location_t loc = get_location_for_stmts (split_store->orig_stmts); tree int_type = build_nonstandard_integer_type (try_size, UNSIGNED); int_type = build_aligned_type (int_type, align); tree dest = fold_build2 (MEM_REF, int_type, addr, build_int_cst (offset_type, try_pos)); and expects the target to cope with this. But IIRC RTL expansion only ever "honors" this if either it has a movmisalign optab for the mode or it is SLOW_UNALIGNED_ACCESS (ok, arm seems to be SLOW_UNALIGNED_ACCESS). So this means we go the bitfield store way (in the end this means store-merging lacks proper costing for strict-align targets). That may end up using all sorts of patterns, like insv and friends. Not sure what happens in the end.