Questionable code in fixup_reorder_chain

Eric Botcazou ebotcazou@adacore.com
Thu Sep 22 18:39:00 GMT 2005


Hi Jan,

I think fixup_reorder_chain contains questionable code to cope with a 
pathological case:

	      /* The degenerated case of conditional jump jumping to the next
		 instruction can happen on target having jumps with side
		 effects.

		 Create temporarily the duplicated edge representing branch.
		 It will get unidentified by force_nonfallthru_and_redirect
		 that would otherwise get confused by fallthru edge not pointing
		 to the next basic block.  */
	      if (!e_taken)
		{
		  rtx note;
		  edge e_fake;
		  bool redirected;

		  e_fake = unchecked_make_edge (bb, e_fall->dest, 0);

		  redirected = redirect_jump (BB_END (bb),
					      block_label (bb), 0);
		  gcc_assert (redirected);

Note the call to redirect_jump that creates a loop.  It is responsible for the 
ICE on the attached Ada testcase with the 3.4.5pre compiler at -O3 because the 
edge and the jump disagree on the target.

The final patch: http://gcc.gnu.org/ml/gcc-cvs/2003-03/msg01294.html
The original version: http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02097.html

Am I right in thinking that the call to redirect_jump must be removed?

Thanks in advance.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.adb
Type: text/x-adasrc
Size: 1784 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20050922/a25a0034/attachment.bin>


More information about the Gcc mailing list