On Mon, Jun 15, 2015 at 2:05 PM, Jason Merrill <ja...@redhat.com> wrote:
> On 06/11/2015 09:25 PM, Patrick Palka wrote:
>>
>> +      parameter_vec = make_tree_vec
>> +       (TREE_VEC_LENGTH (TREE_VALUE (current_template_parms)) + 1);
>> +
>> +      for (int i = 0; i < TREE_VEC_LENGTH (parameter_vec) - 1; i++)
>> +       TREE_VEC_ELT (parameter_vec, i)
>> +         = TREE_VEC_ELT (TREE_VALUE (current_template_parms), i);
>> +
>> +      TREE_VEC_ELT (parameter_vec, TREE_VEC_LENGTH (parameter_vec) - 1)
>> +       = tree_last (parameter_list);
>
>
> Any reason not to use grow_tree_vec?

Doing so causes a lot of ICEs in the testsuite.  I think it's because
grow_tree_vec invalidates the older parameter_vec which some trees may
still be holding a reference to in their DECL_TEMPLATE_PARMS field.

>
>

Reply via email to