http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58970

--- Comment #14 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Jakub Jelinek from comment #13)
> (In reply to Bernd Edlinger from comment #12)
> > I meant the change here is not necessary, because after the
> > if (*bitpos < 0) {...},
> > *offset can no longer be NULL, and I'd leave the assertion untouched.
> 
> Sure, if *bitpos was initially negative, then *offset won't be NULL there.
> But what I mean, are you sure that non-negative *bitpos will never be
> smaller than bitoffset if *offset is NULL?  Of course not on this testcase...

If *bitpos is initially negative, I can proove that *offset is initially NULL.

The second statement cannot be prooved,
because after *bitpos &= ... *bitpos is between 0..7.

For instance 

struct S
{
  struct T
  {
    int a:8;
    int b:1;
  } mode[1];
};

Consider "p->mode[-1].b = 0", I'd expect bitoffset=8, less than *bitpos=0.

Right?

Reply via email to