This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c++/30044


On Mon, Jun 15, 2015 at 2:05 PM, Jason Merrill <jason@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.

>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]