[Bug tree-optimization/79666] [7 Regression] wrong code (SIGFPE) at -O2 on x86_64-linux-gnu (in both 32-bit and 64-bit modes)

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 21 23:14:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79666

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Although gcc says
x.c: In function ‘fn1’:
x.c:16:32: warning: ‘~’ on a boolean expression [-Wbool-operation]
       d = ~((h ^ b.a) & 132 & (~(f && g) | (d && 1)));
                                ^
x.c:16:32: note: did you mean to use logical not?
       d = ~((h ^ b.a) & 132 & (~(f && g) | (d && 1)));
                                ^
                                !
and clang

x.c:15:11: warning: implicit truncation from 'int' to bitfield changes value
from -1 to 63
      [-Wbitfield-constant-conversion]
      b.a = ~0;
          ^ ~~


More information about the Gcc-bugs mailing list