diff options
author | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-12 11:05:19 +0000 |
---|---|---|
committer | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-12 11:05:19 +0000 |
commit | b5d5f0d6d03083ab37fc960f3b3f3302922fdd82 (patch) | |
tree | 36f64b5002b88b0f635e32f7ffb14e7914f56ef2 /gcc/targhooks.c | |
parent | cfbbebf3da74eacec06d7f97c22a2f45193e58ac (diff) | |
download | gcc-b5d5f0d6d03083ab37fc960f3b3f3302922fdd82.tar.gz |
* targhooks.c (default_stack_protect_guard): Avoid sharing RTL
for __stack_chk_guard.
* gcc.target/m68k/20100512-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 8df0de421f8..2c0a65dc926 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -499,6 +499,8 @@ default_stack_protect_guard (void) if (t == NULL) { + rtx x; + t = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier ("__stack_chk_guard"), ptr_type_node); @@ -510,6 +512,11 @@ default_stack_protect_guard (void) DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; + /* Do not share RTL as the declaration is visible outside of + current function. */ + x = DECL_RTL (t); + RTX_FLAG (x, used) = 1; + stack_chk_guard_decl = t; } |