This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 40445: C++ ICE when using __builtin_unreachable() as only statement in a function.
- From: Ian Lance Taylor <iant at google dot com>
- To: David Daney <ddaney at caviumnetworks dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 23 Jun 2009 21:02:07 -0700
- Subject: Re: [PATCH] Fix PR 40445: C++ ICE when using __builtin_unreachable() as only statement in a function.
- References: <4A416C7A.4020804@caviumnetworks.com> <4A416DFF.2010503@caviumnetworks.com>
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