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]
Other format: [Raw text]

Re: [PATCH] Fix PR 40445: C++ ICE when using __builtin_unreachable() as only statement in a function.


David Daney <ddaney@caviumnetworks.com> writes:

> Index: cfgcleanup.c
> ===================================================================
> --- cfgcleanup.c	(revision 148867)
> +++ cfgcleanup.c	(working copy)
> @@ -1903,7 +1903,8 @@ try_optimize_cfg (int mode)
>  		  /* Note that forwarder_block_p true ensures that
>  		     there is a successor for this block.  */
>  		  && (single_succ_edge (b)->flags & EDGE_FALLTHRU)
> -		  && n_basic_blocks > NUM_FIXED_BLOCKS + 1)
> +		  && n_basic_blocks > NUM_FIXED_BLOCKS + 1
> +		  && single_pred_edge (b)->src != ENTRY_BLOCK_PTR)

I don't see why this test is sufficient for what you are trying to
prevent.  It seems to me that this empty block could be followed by a
number of other blocks.

Ian


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