Re: [PATCH] Fix ICE on invalid variable template instantiation (PR c++/72759)

2016-08-03 Thread Jason Merrill
OK. On Wed, Aug 3, 2016 at 8:02 PM, Patrick Palka wrote: > On Wed, 3 Aug 2016, Jason Merrill wrote: > >> Why not check for error_mark_node right after the tsubst_template_args? > > No good reason. This seems to work too. Does the following look OK > after bootstrap +

Re: [PATCH] Fix ICE on invalid variable template instantiation (PR c++/72759)

2016-08-03 Thread Patrick Palka
On Wed, 3 Aug 2016, Jason Merrill wrote: > Why not check for error_mark_node right after the tsubst_template_args? No good reason. This seems to work too. Does the following look OK after bootstrap + regtest? -- >8 -- gcc/cp/ChangeLog: PR c++/72759 * pt.c

Re: [PATCH] Fix ICE on invalid variable template instantiation (PR c++/72759)

2016-08-03 Thread Jason Merrill
Why not check for error_mark_node right after the tsubst_template_args? On Tue, Aug 2, 2016 at 10:06 AM, Patrick Palka wrote: > This patch fixes PR c++/72759. The problem seems to be that when > instantiating a variable template, we fail to propagate error_mark_node > when

[PATCH] Fix ICE on invalid variable template instantiation (PR c++/72759)

2016-08-02 Thread Patrick Palka
This patch fixes PR c++/72759. The problem seems to be that when instantiating a variable template, we fail to propagate error_mark_node when its template arguments are erroneous, and we instead build a bogus TEMPLATE_ID_EXPR which later confuses check_initializer(). Does this look OK to commit