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]

Re: stmt.c (expand_return): Return if optimize_tail_recursion succeeded.



  In message <199902122137.NAA07704@ada.cygnus.com.cygnus.com>you write:
  > I have checked in the following patch.
  > 
  > This fixes a problem where the cygwin compiler was calling abort while
  > compiling readline.  This was accidentally introduced Jan 8 when Jeff Law
  > created the new function optimize_tail_recursion.  A return statement in
  > expand_return was lost when that happened.
  > 
  > Simplified testcase (maybe this should be put in the testsuite?):
  > 
  > sub (int i)
  > {
  >   if (i == 0)
  >     return 0;
  >   else
  >     return sub (({int j; j = i - 1; j;}));
  > }
  > 
  > Patch:
  > 
  > Fri Feb 12 13:06:28 1999  Jim Wilson  <wilson@cygnus.com>
  > 
  > 	* stmt.c (expand_return): Return if optimize_tail_recursion succeeded.
  > 	(optimize_tail_recursion): Change return type from void to int.
  > 	Add return statements.
  > 	* tree.h (optimize_tail_recursion): Change prototype to match.
Thanks.  I feel silly and stoooopid :(

jeff


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