diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-02-21 21:13:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-02-21 21:13:52 +0000 |
commit | 5e73a7beb3213240974117896b61c61a8bcb3664 (patch) | |
tree | a370d7bf1f5bb3f0cb17040b22ce45a080554ec3 /gnu | |
parent | 0cdadceb6151332b0a3f9323d7336ed44c9c8091 (diff) |
In alpha_expand_block_clear(), cope with the offset being negative;
this can happen due to the frame layout change introduced in order to
support the stack protector. Fix from miod.
Bug originally observed by jca and condensed to a 3-liner by myself,
basically local [] arrays being initialized with shorter strings.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/gcc/gcc/config/alpha/alpha.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/gcc/gcc/config/alpha/alpha.c b/gnu/gcc/gcc/config/alpha/alpha.c index 266dc9a011d..b9946e3f06c 100644 --- a/gnu/gcc/gcc/config/alpha/alpha.c +++ b/gnu/gcc/gcc/config/alpha/alpha.c @@ -4178,11 +4178,11 @@ alpha_expand_block_clear (rtx operands[]) if (a > align) { if (a >= 64) - align = a, alignofs = 8 - c % 8; + align = a, alignofs = 8 - (c & 7); else if (a >= 32) - align = a, alignofs = 4 - c % 4; + align = a, alignofs = 4 - (c & 3); else if (a >= 16) - align = a, alignofs = 2 - c % 2; + align = a, alignofs = 2 - (c & 1); } } |