function argument error

Fern Moon
Thu Jun 26 18:38:00 GMT 2008

Dear sir/madam,

I add a pass in gcc. In the pass, I create one tmp variable
va1 =   create_tmp_var(integer_type_node,"test");

At the same time, I create one function call
tree call = build_function_call_expr (print_decl, vargs );

When the  vargs is a constant: vargs =tree_cons (NULL ,  build_int_cst
(integer_type_node, 6); , NULL)
It works well.

However, when I put a variable in . The compiler report compile time
error.  Segment fault

tree va1 =   create_tmp_var(integer_type_node,"test");
add_referenced_var (va1);
va1 = make_ssa_name (va1, NULL_TREE);

 vargs =tree_cons (NULL ,  va1; , NULL)

The error happens when I try to add the call into a basic block.
I think it is related to the SSA operation. But I do not know how to
deal with it.

Thank for your help


More information about the Gcc-help mailing list