Re: [C++ PATCH] Fix ICE with bitfields (PR c++/69164, take 2)

2016-01-08 Thread Jason Merrill
OK. Jason

[C++ PATCH] Fix ICE with bitfields (PR c++/69164, take 2)

2016-01-08 Thread Jakub Jelinek
On Fri, Jan 08, 2016 at 09:02:34AM -0500, Jason Merrill wrote: > On 01/08/2016 07:58 AM, Jakub Jelinek wrote: > >On Fri, Jan 08, 2016 at 01:46:47PM +0100, Bernd Schmidt wrote: > >>On 01/07/2016 10:43 PM, Jakub Jelinek wrote: > >>> > >>> PR c++/69164 > >>> * class.c (layout_class_type): Also cop

Re: [C++ PATCH] Fix ICE with bitfields (PR c++/69164)

2016-01-08 Thread Jason Merrill
On 01/08/2016 07:58 AM, Jakub Jelinek wrote: On Fri, Jan 08, 2016 at 01:46:47PM +0100, Bernd Schmidt wrote: On 01/07/2016 10:43 PM, Jakub Jelinek wrote: PR c++/69164 * class.c (layout_class_type): Also copy DEC_SIZE_UNIT, DECL_BIT_FIELD and DEC_BIT_FIELD_TYPE. Any rea

Re: [C++ PATCH] Fix ICE with bitfields (PR c++/69164)

2016-01-08 Thread Jakub Jelinek
On Fri, Jan 08, 2016 at 01:46:47PM +0100, Bernd Schmidt wrote: > On 01/07/2016 10:43 PM, Jakub Jelinek wrote: > > > > PR c++/69164 > > * class.c (layout_class_type): Also copy DEC_SIZE_UNIT, DECL_BIT_FIELD > > and DEC_BIT_FIELD_TYPE. > > Any reason this isn't using copy_node? No idea,

Re: [C++ PATCH] Fix ICE with bitfields (PR c++/69164)

2016-01-08 Thread Bernd Schmidt
On 01/07/2016 10:43 PM, Jakub Jelinek wrote: PR c++/69164 * class.c (layout_class_type): Also copy DEC_SIZE_UNIT, DECL_BIT_FIELD and DEC_BIT_FIELD_TYPE. Any reason this isn't using copy_node? Bernd

[C++ PATCH] Fix ICE with bitfields (PR c++/69164)

2016-01-07 Thread Jakub Jelinek
Hi! We ICE on the following testcase during SRA, because it sees a field with DECL_SIZE of 1 which is not DECL_BIT_FIELD. The problem is that layout_class_type in some cases copies fields, including DECL_SIZE, but does not copy over DECL_BIT_FIELD flag. The following patch copies even that and a