Re: C++ PATCH to fix another ICE with stray template code (PR c++/84596)

2018-03-13 Thread Jason Merrill
OK. On Tue, Mar 13, 2018 at 6:18 PM, Marek Polacek wrote: > On Tue, Mar 13, 2018 at 01:33:45PM -0400, Jason Merrill wrote: >> On Tue, Mar 13, 2018 at 11:07 AM, Marek Polacek wrote: >> > Here's another case of a template code leaking into

Re: C++ PATCH to fix another ICE with stray template code (PR c++/84596)

2018-03-13 Thread Marek Polacek
On Tue, Mar 13, 2018 at 01:33:45PM -0400, Jason Merrill wrote: > On Tue, Mar 13, 2018 at 11:07 AM, Marek Polacek wrote: > > Here's another case of a template code leaking into cxx_constant_value. > > While I recently added the require_rvalue_constant_expression check, it > >

Re: C++ PATCH to fix another ICE with stray template code (PR c++/84596)

2018-03-13 Thread Jason Merrill
On Tue, Mar 13, 2018 at 11:07 AM, Marek Polacek wrote: > Here's another case of a template code leaking into cxx_constant_value. > While I recently added the require_rvalue_constant_expression check, it > doesn't help here, because the problem is that we have a MODOP_EXPR (a >

C++ PATCH to fix another ICE with stray template code (PR c++/84596)

2018-03-13 Thread Marek Polacek
Here's another case of a template code leaking into cxx_constant_value. While I recently added the require_rvalue_constant_expression check, it doesn't help here, because the problem is that we have a MODOP_EXPR (a template code), whose op1 is a TRUNC_DIV_EXPR without a type, so it's considered