On 9 March 2015 at 00:37, Jan Hubicka <hubi...@ucw.cz> wrote: >> >> I unforutnately spot another problem. With presence of section anchors we >> can not increase alignment of symbol that was already placed into the >> section. >> I think this is reason why we still have pass_increase_alignments that runs >> only on target with anchors. >> >> I added the following check: >> >> + /* If target is already placed in an anchor, we can not touch its >> + alignment. */ >> + if (DECL_RTL_SET_P (target->decl) >> + && MEM_P (DECL_RTL (target->decl)) >> + && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (DECL_RTL (target->decl), 0))) >> + return false; >> >> but found it breaks several vectorization testcases with LTO. This is >> becuase notice_global_symbol computes DECL_RTL even before >> node->increase_alignment is run and we are stuck. >> >> I decided to track this separately from this patch that snowballed quite a >> bit >> already. I do not see how to solve it short of making notice_global_symbol to >> not compute DECL_RTL. It was never quite clear to me why >> notice_global_symbol >> is actually doing this at first place. Is it becuase of target mangling >> happing only at RTL generation time? > > This is now PR65355
Your follow-up patch 88ada5e935d58223ae2d9ce6d0c1c71c372680a8 a.k.a r221269 added this to emit_local(): static bool -emit_local (tree decl ATTRIBUTE_UNUSED, +emit_local (tree decl, const char *name ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT rounded ATTRIBUTE_UNUSED) { + int align = symtab_node::get (decl)->definition_alignment (); #if defined ASM_OUTPUT_ALIGNED_DECL_LOCAL ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, decl, name, - size, DECL_ALIGN (decl)); + size, align); return true; #elif defined ASM_OUTPUT_ALIGNED_LOCAL - ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, DECL_ALIGN (decl)); + ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, align); return true; #else ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); return false; #endif } which gives gcc/varasm.c:1936:7: error: unused variable ‘align’ [-Werror=unused-variable] int align = symtab_node::get (decl)->definition_alignment (); ^ on log/alpha64-dec-vms log/alpha-dec-vms log/i686-cygwinOPT-enable-threads=yes log/i686-mingw32crt log/i686-openbsd3.0 log/i686-pc-msdosdjgpp log/m68k-openbsd Maybe just flag it as used or copy-move it? TIA,