This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference


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

--- Comment #20 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-26 11:00:33 UTC ---
> Eric, you should know this area the best - what do you recommend here?
> [we could assert in the unsigned bitpos taking functions that the MSB
> is not set on bitpos]

I agree that making get_inner_reference artificially return a non-zero poffset
would most certainly be problematic as this would change the semantics.  But
it's also clear that the lower level bit-field manipulation routines aren't
really prepared to deal with negative stuff.  So I think that we shouldn't
change the prototypes of these routines, but instead patch up callers that
forward the values returned by get_inner_reference to these routines.

Adding assertions in these routines could indeed help.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]