This is the mail archive of the gcc-bugs@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]

Re: gcc 2.92.2: bad code generation from tail-call optimization (x86)



  In message <14443.40523.991206.668791@spleen.hq.tensilica.com>you write:
  > 
  > The included function, when compiled with gcc 2.95.2 generates bad code for
  > x86 because of an incorrectly applied tail-call optimization. The function
  > takes the address of an automatic, and thus should not be a candidate for
  > tail-calls. The source and assembly code are commented to show the location
  > of the incorrect tail-call.
  > 
  > We took a quick look into the possible cause, and it appears that the
  > function that implements the optimization in stmt.c:optimize_tail_resursion
  > is using 'frame_offset' before it is calculated.
  > 
  > BTW, egcs-2.91.66 fails in the same way.
I believe this has been fixed in the development sources.
jeff


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