This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inserting a call statement
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: drizzle drizzle <drizzle76 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 27 Jul 2005 12:46:12 -0400
- Subject: Re: Inserting a call statement
- References: <7326d8e405072709332a300ac2@mail.gmail.com>
On Wed, 2005-07-27 at 12:33 -0400, drizzle drizzle wrote:
> Hi
> I am trying to insert a function call "foo" inside the tree list.
>
>
> Inside this particular loop
> for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
> {
>
> // if a particular condition is satisfied I do the following
>
> tree id = get_identifier ("foo");
> tree t = build_function_type_list (void_type_node,NULL_TREE);
> tree decl = build_decl (FUNCTION_DECL, id, t);
> tree call = build_function_call_expr (decl, NULL);
> bsi_insert_before(&bsi,call,BSI_CHAIN_END); // I have tried BSI_NEW_STMT
>
>
> }
>
>
> Although the node is created properly, an assertion in
> tree-flow-inline.h fails. Can someone help me identify the issue here.
> i will appreciate that
What assert do you trigger?
>
> thanks