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: [ping][patch] Fixed-point patch 3/10


Rask Ingemann wrote
> On Wed, Aug 08, 2007 at 03:36:13PM -0700, Fu, Chao-Ying wrote:
> > Mark Mitchell wrote:
> > > 
> > > Fu, Chao-Ying wrote:
> > > 
> > > > gcc/ChangeLog
> > > > 2007-08-01  Chao-ying Fu  <fu@mips.com>
> > > > 
> > > > 	* tree.def (FIXED_POINT_TYPE): New type.
> > > > 	(FIXED_CST): New constant.
> > > > 	(FIXED_CONVERT_EXPR): New expr.
> > > >       ...
> > > 
> > > OK, once we've resolved 2/10.
> > 
> >   Yes.  Since 2/10 was resolved and applied
> > on Monday (Aug. 6), I checked in the patch 3/10 today.
> 
>    Now x86_64-unknown-linux-gnu doesn't bootstrap:
> 
> /home/rask/src/gcc/gcc/tree.c: In function initializer_zerop:
> /home/rask/src/gcc/gcc/tree.c:7694: error: passing argument 1 
> of fixed_zerop
> discards qualifiers from pointer target type
> make[3]: *** [tree.o] Error 1
> 
> If I revert to revision 127305, I can get through stage 2.
> 
> -- 
> Rask Ingemann Lambertsen
> 

Thanks a lot!  The problem is the type of init is const_tree,
but the type is tree for the 1st parameter in fixed_zerop.
I will change the prototype of fixed_zerop.
Let me know if this can fix the breakage.  Thanks!

Regards,
Chao-ying

Index: tree.h
--- tree.h      (revision 127306)
+++ tree.h      (working copy)
@@ -4429,7 +4429,7 @@
 /* fixed_zerop (tree x) is nonzero if X is a fixed-point constant of
    value 0.  */

-extern int fixed_zerop (tree);
+extern int fixed_zerop (const_tree);

 /* staticp (tree x) is nonzero if X is a reference to data allocated
    at a fixed address in memory.  Returns the outermost data.  */
Index: tree.c
===================================================================
--- tree.c      (revision 127306)
+++ tree.c      (working copy)
@@ -1460,7 +1460,7 @@
 /* Return 1 if EXPR is the fixed-point constant zero.  */

 int
-fixed_zerop (tree expr)
+fixed_zerop (const_tree expr)
 {
   return (TREE_CODE (expr) == FIXED_CST
          && double_int_zero_p (TREE_FIXED_CST (expr).data));


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