This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [ping][patch] Fixed-point patch 3/10
- From: "Fu, Chao-Ying" <fu at mips dot com>
- To: "Rask Ingemann Lambertsen" <rask at sygehus dot dk>
- Cc: "Mark Mitchell" <mark at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>, "Thekkath, Radhika" <radhika at mips dot com>, "Stephens, Nigel" <nigel at mips dot com>
- Date: Thu, 9 Aug 2007 10:33:07 -0700
- Subject: 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));