This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR45352
Hello,
On 08.11.2010 17:26, H.J. Lu wrote:
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46366
I've committed the following (r166798) as obvious to fix the test case.
I've made sure that the test still fails without the patch for PR45352.
Sorry for not noticing the warnings earlier.
Andrey
Index: gcc/testsuite/gcc.target/i386/pr45352-2.c
===================================================================
*** gcc/testsuite/gcc.target/i386/pr45352-2.c (revision 166797)
--- gcc/testsuite/gcc.target/i386/pr45352-2.c (revision 166798)
*************** typedef struct
*** 40,48 ****
{
int xvmc_last_slice_code;}
mpeg2dec_accel_t;
! static bitstream_init (picture_t * picture, void *start)
{
picture->bitstream_ptr = start;
}
static slice_xvmc_init (picture_t * picture, int code)
{
--- 40,49 ----
{
int xvmc_last_slice_code;}
mpeg2dec_accel_t;
! static int bitstream_init (picture_t * picture, void *start)
{
picture->bitstream_ptr = start;
+ return (int) (long) start;
}
static slice_xvmc_init (picture_t * picture, int code)
{
*************** static slice_xvmc_init (picture_t * pict
*** 55,61 ****
picture->f_motion.ref
[0]
[0]
! = forward_reference_frame->base + (offset ? picture->pitches[0] : 0);
picture->f_motion.ref[0][1] = (offset);
if (picture->picture_structure)
picture->pitches[0] <<= picture->pitches[1] <<= 1;
--- 56,62 ----
picture->f_motion.ref
[0]
[0]
! = (char) (long) (forward_reference_frame->base + (offset ?
picture->pitches[0] : 0));
picture->f_motion.ref[0][1] = (offset);
if (picture->picture_structure)
picture->pitches[0] <<= picture->pitches[1] <<= 1;
*************** void
*** 90,96 ****
mpeg2_xvmc_slice
(mpeg2dec_accel_t * accel, picture_t * picture, int code, uint8_t
buffer,int mba_inc)
{
! xine_xvmc_t * xvmc = bitstream_init (picture, buffer);
slice_xvmc_init (picture, code);
while (1)
{
--- 91,97 ----
mpeg2_xvmc_slice
(mpeg2dec_accel_t * accel, picture_t * picture, int code, uint8_t
buffer,int mba_inc)
{
! xine_xvmc_t * xvmc = (xine_xvmc_t *) (long) bitstream_init (picture,
(void *) (long) buffer);
slice_xvmc_init (picture, code);
while (1)
{
Index: gcc/testsuite/ChangeLog
===================================================================
*** gcc/testsuite/ChangeLog (revision 166797)
--- gcc/testsuite/ChangeLog (revision 166798)
***************
*** 1,3 ****
--- 1,9 ----
+ 2010-11-16 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/46366
+ * gcc.target/i386/pr45352-2.c: Silence warnings by using appropriate
+ casts.
+
2010-11-16 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-fre-30.c: New testcase.