Fix -fno-optimize-sibling-calls breakage

Eric Botcazou ebotcazou@adacore.com
Sun Apr 23 18:18:00 GMT 2006


The doc are pretty clear:

`-foptimize-sibling-calls'
     Optimize sibling and tail recursive calls.

     Enabled at levels `-O2', `-O3', `-Os'.

that is to say, -foptimize-sibling-calls controls the tail recursive call 
optimization too.

Tested on x86_64-suse-linux, applied to all active branches as obvious.


2006-04-23  Eric Botcazou  <ebotcazou@adacore.com>

	* tree-tailcall.c (pass_tail_recursion): Use gate_tail_calls too.


2006-04-23  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.dg/sibcall-7.c: New test.
	* gcc.dg/tree-ssa/tailrecursion-1.c: Pass -foptimize-sibling-calls.
	* gcc.dg/tree-ssa/tailrecursion-2.c: Likewise.
	* gcc.dg/tree-ssa/tailrecursion-3.c: Likewise.
	* gcc.dg/tree-ssa/tailrecursion-4.c: Likewise.
	* gcc.dg/tree-ssa/tailrecursion-5.c: Likewise.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sibcall-7.c
Type: text/x-csrc
Size: 726 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060423/980bdc31/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 2658 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060423/980bdc31/attachment-0001.bin>


More information about the Gcc-patches mailing list