https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68537
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-*-* Component|tree-optimization |rtl-optimization Version|unknown |6.0 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- We vectorize zeroing of protected_value and current_value which both are analyzed as being properly aligned. They are of type struct sym_val { const Elf64_Sym *s; struct link_map *m; }; which would have natural alignment of 8 bytes only. The actual decls look like arg 0 <var_decl 0x7ffff62d4e10 current_value type <record_type 0x7ffff67b2690 sym_val sizes-gimplified type_0 TI size <integer_cst 0x7ffff68cccf0 constant 128> unit size <integer_cst 0x7ffff68ccd08 constant 16> align 64 symtab 0 alias set 44 canonical type 0x7ffff67b2690 fields <field_decl 0x7ffff6873098 s> context <translation_unit_decl 0x7ffff671dbb8 D.10151> pointer_to_this <pointer_type 0x7ffff64dd5e8> chain <type_decl 0x7ffff6873000 D.9849>> addressable used TI file dl-lookup.c line 810 col 18 size <integer_cst 0x7ffff68cccf0 128> unit size <integer_cst 0x7ffff68ccd08 16> align 128 context <function_decl 0x7ffff6a968c0 _dl_lookup_symbol_x> and thus indeed have a DECL_ALIGN of 16 bytes. expand_one_var computes align as else align = MINIMUM_ALIGNMENT (var, DECL_MODE (var), DECL_ALIGN (var)); 128 as well and registers that with the output machinery. Partition 2: size 64 align 16 all protected_value all Partition 1: size 16 align 16 current_value Partition 0: size 8 align 8 old_hash which looks ok as well. Breakpoint 11, expand_one_stack_var_at ( decl=<var_decl 0x7ffff62ddc60 protected_value>, base=0x7ffff68cc3a8, base_align=128, offset=-64) at /space/rguenther/src/svn/trunk3/gcc/cfgexpand.c:978 978 gcc_assert (offset == trunc_int_for_mode (offset, Pmode)); Breakpoint 11, expand_one_stack_var_at ( decl=<var_decl 0x7ffff62d4e10 current_value>, base=0x7ffff68cc3a8, base_align=128, offset=-80) at /space/rguenther/src/svn/trunk3/gcc/cfgexpand.c:978 978 gcc_assert (offset == trunc_int_for_mode (offset, Pmode)); ok as well. So does the intitial RTL (well, still virtual-stack-vars is life). So this is an RTL optimization or target issue.