On Tue, Sep 15, 2015 at 11:28 AM, Ilya Enkovich <enkovich....@gmail.com> wrote: > 2015-09-13 16:36 GMT+03:00 Richard Biener <richard.guent...@gmail.com>: >> On Mon, Sep 7, 2015 at 2:39 PM, Ilya Enkovich <enkovich....@gmail.com> wrote: >>> 2015-09-02 15:35 GMT+03:00 Richard Biener <richard.guent...@gmail.com>: >>>> >>>> DECL_FIELD_BIT_OFFSET should be never NULL. Whoever created that >>>> FIELD_DECL created an invalid one. >>>> >>>> Richard. >>>> >>> >>> layout_class_type doesn't place fields with no type >> >> Err - that's because fields should also have a type. > > Sure. But we are talking about a wrong code and still want to continue > compilation to some point even if some field misses a type. It means > everything possibly invoked at this stage should check type against > error_mark_node. Thus I need to handle it gracefully in > chkp_find_bound_slots I suppose.
I see. I wonder why we even call chkp_find_bound_slots if seen_errors(). I suppose only recursing for COMPLETE_TYPE_P () would work? Richard. > Ilya > >> >>> and thus we have >>> nothing for DECL_FIELD_BIT_OFFSET. We still continue compilation and >>> function parameters gimplification causes a call to >>> chkp_find_bound_slots_1 which tries to access. So probably I should >>> handle gracefully fields with error_mark_node as a type? Or we better >>> put something into DECL_FIELD_BIT_OFFSET (zero? error_mark_node?) for >>> such fields. >>> >>> Ilya