mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 13:51:00 +08:00
simplify-rtx.c (simplify_immed_subreg): Only clear up to elem_bitsize bits, not max_bitsize.
* simplify-rtx.c (simplify_immed_subreg) <case CONST_DOUBLE>: Only clear up to elem_bitsize bits, not max_bitsize. * gcc.target/i386/sse-4.c: New test. From-SVN: r103318
This commit is contained in:
parent
3c0c8f9dff
commit
1125164cd3
@ -1,3 +1,8 @@
|
||||
2005-08-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* simplify-rtx.c (simplify_immed_subreg) <case CONST_DOUBLE>: Only clear
|
||||
up to elem_bitsize bits, not max_bitsize.
|
||||
|
||||
2005-08-21 Sebastian Pop <pop@cri.ensmp.fr>
|
||||
|
||||
PR tree-optimization/23433
|
||||
|
@ -3605,7 +3605,7 @@ simplify_immed_subreg (enum machine_mode outermode, rtx op,
|
||||
}
|
||||
/* It shouldn't matter what's done here, so fill it with
|
||||
zero. */
|
||||
for (; i < max_bitsize; i += value_bit)
|
||||
for (; i < elem_bitsize; i += value_bit)
|
||||
*vp++ = 0;
|
||||
}
|
||||
else
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-08-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.target/i386/sse-4.c: New test.
|
||||
|
||||
2005-08-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR testsuite/23239
|
||||
|
10
gcc/testsuite/gcc.target/i386/sse-4.c
Normal file
10
gcc/testsuite/gcc.target/i386/sse-4.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* This testcase caused a buffer overflow in simplify_immed_subreg. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -msse2" } */
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
||||
__m128i foo (__m128i x)
|
||||
{
|
||||
return _mm_min_epu8 (x, _mm_set1_epi8 (10));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user