Hi! I've committed following fix to unbreak asan on -fsection-anchors targets. If anyone has better ideas how to represent for RTL artificial label we emit from final.c at the beginning of current function, I'd appreciate it.
2013-11-14 Jakub Jelinek <ja...@redhat.com> PR sanitizer/59122 * asan.c (asan_emit_stack_protection): Ensure -fsection-anchors isn't confused by the artificial decl. --- gcc/asan.c (revision 204800) +++ gcc/asan.c (working copy) @@ -1002,6 +1002,9 @@ asan_emit_stack_protection (rtx base, HO TREE_STATIC (decl) = 1; TREE_PUBLIC (decl) = 0; TREE_USED (decl) = 1; + DECL_INITIAL (decl) = decl; + TREE_ASM_WRITTEN (decl) = 1; + TREE_ASM_WRITTEN (id) = 1; emit_move_insn (mem, expand_normal (build_fold_addr_expr (decl))); shadow_base = expand_binop (Pmode, lshr_optab, base, GEN_INT (ASAN_SHADOW_SHIFT), Jakub