[Bug middle-end/58970] [4.7/4.8/4.9 Regression] internal compiler error: in get_bit_range, at expr.c:4562
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Mon Nov 4 10:32:00 GMT 2013
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?
More information about the Gcc-bugs
mailing list