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;
    }

since 'length' of ARRAY_REF is 4 and just two arguments are passed.

I don't think there could be a stable testcase for that.

Alex.

Reply via email to