Hi again,
I think that the type of type_node is missing. Try to add TREE_TYPE (type_node); For example TREE_TYPE (type_node) = integer_type_node. (if MyType is int).
"MyType" is a struct (of other again coumpound types) and will not work with already existing type nodes like integer_type_node. For me is still not clear how to do it in this case. Thanks, Ferad