How to add a new operand to an expression?
law@redhat.com
law@redhat.com
Sun Oct 12 17:53:00 GMT 2003
In message <20031009160715.GA29347@alinoe.com>, Carlo Wood writes:
>On Thu, Oct 09, 2003 at 11:16:49AM -0400, Diego Novillo wrote:
>> On Thu, 2003-10-09 at 11:05, Carlo Wood wrote:
>>
>> > Can you be more specific? I see nothing in make_node that
>> > seems to need adjustment, gives me a clue or is even related
>> > to CALL_EXPR :/.
>
>> You may have missed the call to tree_size inside make_node. From the
>> debug dump you sent, it seems that you're losing track of how much
>> memory was allocated to CALL_EXPR. You'll have to debug from there.
>
>tree_size() is automatically returning the correct size
>after updating tree.def, of course.
>
>tree_size() returns:
>
> return (sizeof (struct tree_exp)
> + TREE_CODE_LENGTH (code) * sizeof (char *) - sizeof (char *));
>
>The TREE_CODE_LENGTH is changed as a result of
>changing the tree.def.
>
>
>I am still clueless of why it doesn't work
>the way I am doing this.
Well, you also have to find all the places that call "build" to build
nodes of the specified type and have them pass in an additional argument.
Otherwise the additional arguments get garbage off the stack. See
tree.c::build.
jeff
More information about the Gcc
mailing list