2015-09-15 14:01 GMT+03:00 Ilya Enkovich <enkovich....@gmail.com>: > 2015-09-15 13:32 GMT+03:00 Richard Biener <richard.guent...@gmail.com>: >> On Tue, Sep 15, 2015 at 11:28 AM, Ilya Enkovich <enkovich....@gmail.com> >> wrote: >> >> I see. I wonder why we even call chkp_find_bound_slots if seen_errors(). > > Even with errors we still gimplify function. Function parameters > gimplification checks where parameters are passed to possibly copy > some of them. It triggers ix86_function_arg_advance which uses > chkp_find_bound_slots to skip required amount of bounds registers. > >> I suppose only recursing for COMPLETE_TYPE_P () would work? > > Yep, it should work. I'll rework my fix.
It turned out to be wrong. For this test struct S { S f; }; void fn1 (S p1) {} Structure S is considered as complete (has size 8 for some reason) at fn1 gimplification. Thus even with complete type check I still hit this field with error_node instead of a type and NULL at DECL_FIELD_BIT_OFFSET. Should my current fix be OK then? Thanks, Ilya