This is the mail archive of the 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: [Patch ARM] Turn on sibling calls for Thumb2.

On Wed, 20 May 2009, Ramana Radhakrishnan wrote:

> > FYI, Mark Mitchell tested an internal patch to do this last year, and
> > discovered it broke early returns from functions that end in a tail
> > call.  It was something to do with USE_RETURN_INSN, but we didn't
> > get to the bottom of it at the time.
> > 
> > I think something as simple as this will show the problem:
> > 
> > int bar();
> > int foo (int arg)
> > {
> >   if (arg < 1)
> >     return 0;
> >   return bar ();
> > }
> Thanks for the info. That is useful and I can see that this case is broken
> today even after my patch, though my tests seem to be chugging along right
> now.  I will hold back on my patch till the time that this is fixed.

If this doesn't show up in the testsuite, something like the above that 
shows the problem should be added as a testcase (to gcc.c-torture/execute, 
probably) by the fixed patch.  (I would however be quite surprised if 
nothing in the testsuite shows up such a bug.)

Joseph S. Myers

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