PR tree-optimization/19337

Jan Hubicka jh@suse.cz
Tue Jan 18 06:58:00 GMT 2005


> On Thu, 2005-01-13 at 08:50 +0100, Jan Hubicka wrote:
> > Hi,
> > the problem here is link pointer being mapped incorrectly during
> > recursive inlining.
> > 
> > Honza
> > 
> > void write_char(char);
> > int len(char*);
> > void f(char *a)
> > {
> >   int col = 0;
> >   int i;
> >   void wchar(char c)
> >   {
> >     if (c == '\t')
> >      {
> >       do {
> >        wchar(' ');
> >       } while ((col%8)!=0);
> >      }
> >     else
> >      {
> >        write_char (c);
> >        col++;
> >      }
> >   }
> >   for(i =0;i<len(a);i++)
> >   {
> >    wchar(*a);
> >   }
> > }
> > 
> > 2005-01-13  Jan Hubicka  <jh@suse.cz>
> > 
> > 	PR tree-optimize/19337
> > 	* tree-inlie.c (initialize_inlined_parameters): Copy
> > 	saved_static_chain_decl only.
> Why not this instead?
> 
>   if (fn == current_function_decl)
>     p = DECL_STRUCT_FUNCTION (fn)->saved_static_chain_decl;
> 
> 
> That seems to work just as well and matches the test used for using
> the saved_args earlier in the same function.

Yes, that would work too.  (for tree-profiling I am mid way reorganizing
inliner so it has more saved bodies around so my mind is bit futuristic)

Honza
> 
> jeff
> 
> 



More information about the Gcc-patches mailing list