Matt Davis <mattdav...@gmail.com> writes: > Well, I have successfully created and used an initialized structure. > Note that I do not need to run the make_ssa_name. I can declare the > struct as TREE_STATIC and work from there. Now, my problem with the > expand_expr_real_1 check failing is because some of the values I > initialize in my compile-time created struct can be different at > runtime. Is there a way I can take this constructor tree node, and > have all of the values in it set in the middle of my function, where > those values are defined? I do not need the structure initialized > upon function entry. What I need is to have all of the values, which > I already setup when I am in the middle of the function being > processed. I need these values actually filled-out in the middle of > function instead at function entry. I am unsure how to do this. The > constructor node exists, and I'm in the middle of an IPA pass. I > assume I can call gimplify_expr() but I am thinking I need to pass it > something different than just a constructor tree node.
Once the struct exists, you can use MODIFY_EXPR to assign a value to a COMPONENT_REF referring to the struct variable and the FIELD_DECL. Or you can build your constructor out of expressions. I'm not sure I really understand your question so I'm not sure if these are the kinds of answers you are looking for. Ian