aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-10-13 10:29:03 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-10-13 10:29:03 +0200
commit1202f33e5e1e4236fec7a3c1d14c16b5f13c2aaa (patch)
tree685fcc683b155fa909df23b9901c4825e6a36a60 /gcc/cfgexpand.c
parent90bca4ed80de6437b4101a65eb29fb034b793981 (diff)
downloadgcc-1202f33e5e1e4236fec7a3c1d14c16b5f13c2aaa.zip
gcc-1202f33e5e1e4236fec7a3c1d14c16b5f13c2aaa.tar.gz
gcc-1202f33e5e1e4236fec7a3c1d14c16b5f13c2aaa.tar.bz2
re PR target/77957 (Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64)
PR target/77957 * hooks.h (hook_tree_void_null): Declare. * hooks.c (hook_tree_void_null): New function. * langhooks.c (lhd_return_null_tree_v): Remove. * langhooks-def.h (lhd_return_null_tree_v): Remove. * cfgexpand.c (stack_protect_prologue): If guard_decl is NULL, set y to const0_rtx. * function.c (stack_protect_epilogue): Likewise. * config/tilepro/tilepro.c (TARGET_STACK_PROTECT_GUARD): Redefine if TARGET_THREAD_SSP_OFFSET is defined. * config/s390/s390.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/sparc/sparc.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/tilegx/tilegx.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/i386/i386.c (TARGET_STACK_PROTECT_GUARD): Likewise. (ix86_stack_protect_guard): New function. c/ * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null instead of lhd_return_null_tree_v. ada/ * gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null instead of lhd_return_null_tree_v. From-SVN: r241087
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index c7a2faa..c62e920 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -6100,7 +6100,10 @@ stack_protect_prologue (void)
rtx x, y;
x = expand_normal (crtl->stack_protect_guard);
- y = expand_normal (guard_decl);
+ if (guard_decl)
+ y = expand_normal (guard_decl);
+ else
+ y = const0_rtx;
/* Allow the target to copy from Y to X without leaking Y into a
register. */