diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-14 18:28:43 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-14 18:28:43 +0000 |
commit | 7c4fae987b50e1fee4e5d614903ebf2cab1eb2f2 (patch) | |
tree | 0213dbfa59e7b40f340629ba9057c38411ae7817 /gcc/asan.c | |
parent | 771a5362c505df9512ca7a4e04879d71acf59f9c (diff) | |
download | gcc-7c4fae987b50e1fee4e5d614903ebf2cab1eb2f2.tar.gz |
PR sanitizer/59122
* asan.c (asan_emit_stack_protection): Ensure -fsection-anchors
isn't confused by the artificial decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/asan.c b/gcc/asan.c index 9b6f96872ec..a3fb51fa8db 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1002,6 +1002,9 @@ asan_emit_stack_protection (rtx base, HOST_WIDE_INT *offsets, tree *decls, 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), |