This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regressions for gcc.c-torture/compile/961203-1.c gcc.dg/20020219-1.c on 64-x-32 with PR32563 sign/sizetype fix


On Thu, 23 Aug 2007, Richard Guenther wrote:

> On Thu, 23 Aug 2007, Richard Guenther wrote:
> 
> > Index: expr.c
> > ===================================================================
> > --- expr.c	(revision 127731)
> > +++ expr.c	(working copy)
> > @@ -5915,6 +5915,7 @@ get_inner_reference (tree exp, HOST_WIDE
> >  				 fold_convert (bitsizetype, offset),
> >  				 bitsize_unit_node))
> >        && 0 != (tem = size_binop (PLUS_EXPR, tem, bit_offset))
> > +      && !TREE_OVERFLOW (tem)
> >        && host_integerp (tem, 0))
> >      *pbitpos = tree_low_cst (tem, 0), *poffset = 0;
> >    else
> 
> Unfortunately that regresses with PR32563.

The following not.  It get's ugly :/

Index: expr.c
===================================================================
--- expr.c	(revision 127739)
+++ expr.c	(working copy)
@@ -5912,9 +5912,11 @@ get_inner_reference (tree exp, HOST_WIDE
      constant bit position.  Otherwise, split it up.  */
   if (host_integerp (offset, 0)
       && 0 != (tem = size_binop (MULT_EXPR,
-				 fold_convert (bitsizetype, offset),
+				 build_int_cst_type (bitsizetype,
+						     TREE_INT_CST_LOW (offset)),
 				 bitsize_unit_node))
       && 0 != (tem = size_binop (PLUS_EXPR, tem, bit_offset))
+      && !TREE_OVERFLOW (tem)
       && host_integerp (tem, 0))
     *pbitpos = tree_low_cst (tem, 0), *poffset = 0;
   else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]