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: [java] do not ICE when TREE_LIST node was copied


> On Wed, Aug 27, 2008 at 4:01 PM, Jan Hubicka <jh@suse.cz> wrote:
> > Hi,
> > Java langhooks rely on fact that every function type parameter list is terminated
> > by end_params_node TREE_LIST node.  This breaks with my new bits for removing operands
> > from functions calls since TREE_LIST node is copied.
> > I don't think it is safe to make this assumption (alternatively I can just make
> > the tree.c bits to preserve last TREE_CHAIN but it is bit painful as it does not work
> > well with nreverse).
> >
> > Bootstrapped/regtested i686-linux.
> > OK?
> 
> I think the middle-end uses void_list_node in the same regard
> (it strips that before nreverse and the re-applies it).  So I don't think this
> patch is correct.

Indeed it is invalid.  I will send updated patch for skip_args code to
preserve void_list_node unduplicated at the end of lists.

Honza
> 
> Richard.
> 
> > Honza
> >        * java/lang.c (put_decl_node): Look for VOID_TYPE node instead of cons.
> > Index: java/lang.c
> > ===================================================================
> > *** java/lang.c (revision 139571)
> > --- java/lang.c (working copy)
> > *************** put_decl_node (tree node)
> > *** 391,397 ****
> >              if (TREE_CODE (TREE_TYPE (node)) == METHOD_TYPE)
> >                args = TREE_CHAIN (args);
> >              put_decl_string ("(", 1);
> > !             for ( ; args != end_params_node;  args = TREE_CHAIN (args), i++)
> >                {
> >                  if (i > 0)
> >                    put_decl_string (",", 1);
> > --- 391,397 ----
> >              if (TREE_CODE (TREE_TYPE (node)) == METHOD_TYPE)
> >                args = TREE_CHAIN (args);
> >              put_decl_string ("(", 1);
> > !             for ( ; args && !VOID_TYPE_P (TREE_VALUE (args));  args = TREE_CHAIN (args), i++)
> >                {
> >                  if (i > 0)
> >                    put_decl_string (",", 1);
> >


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