On Apr 19, 2006, at 4:48 PM, Alexey Starovoytov wrote:
Hi,
Is this a bug that we were lucky not to hit?
cp/pt.c:
return build_x_binary_op (ARRAY_REF, op1, RECUR (TREE_OPERAND (t,
1)),
/*overloaded_p=*/NULL);
tree
build_x_binary_op (enum tree_code code, tree arg1, tree arg2,
bool *overloaded_p)
{
...
return build_min_nt (code, arg1, arg2);
...
return build_min_non_dep (code, expr, orig_arg1, orig_arg2);
}
the 'code' for build_min* will still be ARRAY_REF, so both functions
have a chance to init ARRAY_REF with some junk:
for (i = 0; i < length; i++)
{
tree x = va_arg (p, tree);
TREE_OPERAND (t, i) = x;
}
The returned memory is memset in make_node in tree.c or thereabouts.
IIRC.
--Dan