This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/3] [asan] Factorize condition insertion code out of build_check_stmt
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dodji Seketeli <dodji at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>, Xinliang David Li <davidxl at google dot com>, Wei Mi <wmi at google dot com>
- Date: Tue, 23 Oct 2012 15:14:11 +0200
- Subject: Re: [PATCH 2/3] [asan] Factorize condition insertion code out of build_check_stmt
- References: <87liex8hjt.fsf@redhat.com> <87a9vd8hfs.fsf@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Oct 23, 2012 at 03:08:07PM +0200, Dodji Seketeli wrote:
> +static gimple_stmt_iterator
> +create_cond_insert_point_before_iter (gimple_stmt_iterator *iter,
> + bool then_more_likely_p,
> + basic_block *then_block,
> + basic_block *fallthrough_block)
> +{
> + gcc_assert (then_block != NULL && fallthrough_block != NULL);
I think this assert is useless, if they are NULL
> + *then_block = then_bb;
> + *fallthrough_block = fallthru_bb;
the above two stmts will just crash and be as useful for debugging
as the assert.
Jakub