diff mbox

[committed] Unbreak asan on ppc (PR sanitizer/59122)

Message ID 20131114183158.GG27813@tucnak.zalov.cz
State New
Headers show

Commit Message

Jakub Jelinek Nov. 14, 2013, 6:31 p.m. UTC
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  <jakub@redhat.com>

	PR sanitizer/59122
	* asan.c (asan_emit_stack_protection): Ensure -fsection-anchors
	isn't confused by the artificial decl.


	Jakub
diff mbox

Patch

--- 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),