Re: C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-15 Thread Jason Merrill
On 9/11/19 4:15 PM, Marek Polacek wrote: This ICEs since r267272 - more location wrapper nodes, but not because we can't cope with new location wrappers, but because that commit introduced a call to maybe_constant_value in cp_build_array_ref. In this testcase we call it with f

Re: C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-12 Thread Marek Polacek
On Thu, Sep 12, 2019 at 11:08:43AM +0200, Paolo Carlini wrote: > Hi again, > > On 12/09/19 11:03, Paolo Carlini wrote: > > Hi, > > > > On 11/09/19 23:15, Marek Polacek wrote: > > > --- gcc/cp/pt.c > > > +++ gcc/cp/pt.c > > > @@ -26709,7 +26709,7 @@ build_non_dependent_expr (tree expr) > > >    

Re: C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-12 Thread Paolo Carlini
Hi again, On 12/09/19 11:03, Paolo Carlini wrote: Hi, On 11/09/19 23:15, Marek Polacek wrote: --- gcc/cp/pt.c +++ gcc/cp/pt.c @@ -26709,7 +26709,7 @@ build_non_dependent_expr (tree expr)     if (TREE_CODE (expr) == COND_EXPR)   return build3 (COND_EXPR, TREE_TYPE (expr), -

Re: C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-12 Thread Paolo Carlini
Hi, On 11/09/19 23:15, Marek Polacek wrote: --- gcc/cp/pt.c +++ gcc/cp/pt.c @@ -26709,7 +26709,7 @@ build_non_dependent_expr (tree expr) if (TREE_CODE (expr) == COND_EXPR) return build3 (COND_EXPR, TREE_TYPE (expr), - TREE_OPERAND (expr, 0), +

C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-11 Thread Marek Polacek
This ICEs since r267272 - more location wrapper nodes, but not because we can't cope with new location wrappers, but because that commit introduced a call to maybe_constant_value in cp_build_array_ref. In this testcase we call it with f (VIEW_CONVERT_EXPR("BAR")) ? 1 : 0 argument and that