------- Comment #11 from rguenth at gcc dot gnu dot org 2008-04-30 19:26 ------- On the trunk we have:
f1 (const _Bool * p) { <bb 2>: return (_Bool) ((int) *p & 1); f2 (const _Bool * p) { <bb 2>: return *p; f3 (_Bool * p) { <bb 2>: *p = (_Bool) !*p; f4 (_Bool * p) { <bb 2>: *p = 1; where i686 assembly looks good for all cases. Still f4 looks weird (wrong-code?!) as we fold *p = ~*p to *p = (int) *p != -1; I'll open a PR for this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18908