summaryrefslogtreecommitdiffstats
path: root/gnu/gcc
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-06-25 20:54:05 +0000
committermiod <miod@openbsd.org>2011-06-25 20:54:05 +0000
commitf95c67a6a25495513ed1fab0d6ce6ee86cdcf2f8 (patch)
tree338e63dfb5d9527662f3432c048c38d9b3688dab /gnu/gcc
parentAdd MSI hypervisor calls. (diff)
downloadwireguard-openbsd-f95c67a6a25495513ed1fab0d6ce6ee86cdcf2f8.tar.xz
wireguard-openbsd-f95c67a6a25495513ed1fab0d6ce6ee86cdcf2f8.zip
Fix gcc PR #35965 as suggested in
http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01641.html This fixes a stack protector code bug which only got triggered by some particular function patterns, such as libc's __vfprintf. ok drahn@
Diffstat (limited to 'gnu/gcc')
-rw-r--r--gnu/gcc/gcc/config/arm/arm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/gcc/gcc/config/arm/arm.c b/gnu/gcc/gcc/config/arm/arm.c
index 670e7912d29..01a554342b3 100644
--- a/gnu/gcc/gcc/config/arm/arm.c
+++ b/gnu/gcc/gcc/config/arm/arm.c
@@ -3217,7 +3217,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
gcc_assert (!no_new_pseudos);
if (arm_pic_register != INVALID_REGNUM)
{
- cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation
@@ -3229,7 +3230,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
{
rtx seq;
- cfun->machine->pic_reg = gen_reg_rtx (Pmode);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_reg_rtx (Pmode);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation