This is the mail archive of the gcc-help@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]

function argument error


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

fern


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