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

2015-07-09 Thread Patrick Palka
On Fri, Jun 26, 2015 at 7:40 AM, Patrick Palka patr...@parcs.ath.cx wrote: Here is a more modest approach to fixing this PR. Instead of updating current_template_parms with each newly processed template parameter, this patch just updates it with a dummy parameter level once per parameter

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

2015-07-09 Thread Jason Merrill
OK, thanks. Jason

[PATCH] Fix PR c++/30044

2015-06-26 Thread Patrick Palka
Here is a more modest approach to fixing this PR. Instead of updating current_template_parms with each newly processed template parameter, this patch just updates it with a dummy parameter level once per parameter list. So now in tsubst(), to fix the reported ICE we just have to avoid

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

2015-06-24 Thread Patrick Palka
On Wed, Jun 24, 2015 at 5:08 AM, Markus Trippelsdorf mar...@trippelsdorf.de wrote: On 2015.06.23 at 19:40 -0400, Patrick Palka wrote: On Tue, Jun 23, 2015 at 12:38 AM, Jason Merrill ja...@redhat.com wrote: On 06/15/2015 02:32 PM, Patrick Palka wrote: On Mon, Jun 15, 2015 at 2:05 PM, Jason

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

2015-06-23 Thread Patrick Palka
On Tue, Jun 23, 2015 at 12:38 AM, Jason Merrill ja...@redhat.com wrote: On 06/15/2015 02:32 PM, Patrick Palka wrote: On Mon, Jun 15, 2015 at 2:05 PM, Jason Merrill ja...@redhat.com wrote: Any reason not to use grow_tree_vec? Doing so causes a lot of ICEs in the testsuite. I think it's

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

2015-06-22 Thread Jason Merrill
On 06/15/2015 02:32 PM, Patrick Palka wrote: On Mon, Jun 15, 2015 at 2:05 PM, Jason Merrill ja...@redhat.com wrote: 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

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

2015-06-15 Thread Jason Merrill
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

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

2015-06-15 Thread Patrick Palka
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++)

[PATCH] Fix PR c++/30044

2015-06-11 Thread Patrick Palka
The crux of the issue causing PR 30044 is that, in the middle of processing a template parameter list, current_template_parms is not up-to-date. This causes problems particularly when we attempt to instantiate a type that's defined within the very parameter list we are processing. Of course,