Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018, 7:53 PM Paolo Carlini wrote: > Hi again, > > On 14/04/2018 00:12, Paolo Carlini wrote: > > Hi, > > > > On 13/04/2018 19:45, Jason Merrill wrote: > >> Ah, I see. The problem is that even though convert_to_integer_1 was > >> called with dofold false, we lose that when it call

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi again, On 14/04/2018 00:12, Paolo Carlini wrote: Hi, On 13/04/2018 19:45, Jason Merrill wrote: Ah, I see.  The problem is that even though convert_to_integer_1 was called with dofold false, we lose that when it calls convert(). Why not recurse directly to convert_to_integer_1 with the under

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 19:45, Jason Merrill wrote: Ah, I see. The problem is that even though convert_to_integer_1 was called with dofold false, we lose that when it calls convert(). Why not recurse directly to convert_to_integer_1 with the underlying type? That would avoid the undesired folding.

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018 at 1:18 PM, Paolo Carlini wrote: > Hi, > > > On 13/04/2018 19:14, Jason Merrill wrote: >> >> On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini >> wrote: >>> >>> Hi, >>> >>> On 13/04/2018 16:06, Jason Merrill wrote: On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini >

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 19:14, Jason Merrill wrote: On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini wrote: Hi, On 13/04/2018 16:06, Jason Merrill wrote: On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini wrote: Hi, in this error-recovery regression, after a sensible error message issued by cxx_const

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini wrote: > Hi, > > On 13/04/2018 16:06, Jason Merrill wrote: >> >> On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini >> wrote: >>> >>> Hi, >>> >>> in this error-recovery regression, after a sensible error message issued >>> by >>> cxx_constant_init, store

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 16:06, Jason Merrill wrote: On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini wrote: Hi, in this error-recovery regression, after a sensible error message issued by cxx_constant_init, store_init_value stores an error_mark_node as DECL_INITIAL of the VAR_DECL for 'j'. This error

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini wrote: > Hi, > > in this error-recovery regression, after a sensible error message issued by > cxx_constant_init, store_init_value stores an error_mark_node as > DECL_INITIAL of the VAR_DECL for 'j'. This error_mark_node reappears much > later, to cau

[C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, in this error-recovery regression, after a sensible error message issued by cxx_constant_init, store_init_value stores an error_mark_node as DECL_INITIAL of the VAR_DECL for 'j'. This error_mark_node reappears much later, to cause a crash during gimplification. As far as I know, the choic