Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Marek Polacek
On Wed, Feb 26, 2020 at 06:01:30PM -0700, Martin Sebor wrote: > On 2/26/20 1:44 PM, Marek Polacek wrote: > > r7-2111 introduced maybe_constant_value in cp_fully_fold. > > maybe_constant_value uses cxx_eval_outermost_constant_expr, which > > can clear TREE_CONSTANT: > > 6510 else if (non_constant_

Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Martin Sebor
On 2/26/20 1:44 PM, Marek Polacek wrote: r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6510 else if (non_constant_p && TREE_CONSTANT (r)) [...] 6529 TREE_CONSTANT (r) = false; In this t

Re: [PATCH] c++: Fix ICE with invalid array bounds [PR93789]

2020-02-26 Thread Jason Merrill
On 2/26/20 3:44 PM, Marek Polacek wrote: r7-2111 introduced maybe_constant_value in cp_fully_fold. maybe_constant_value uses cxx_eval_outermost_constant_expr, which can clear TREE_CONSTANT: 6510 else if (non_constant_p && TREE_CONSTANT (r)) [...] 6529 TREE_CONSTANT (r) = false; In this t