[Bug tree-optimization/106878] [11/12/13 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise caluclation

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 8 13:38:53 GMT 2022


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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Adjusted testcase that ICEs also on x86_64:
typedef __INTPTR_TYPE__ intptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
int a;

int
foo (const int *c)
{
  uintptr_t d = ((intptr_t) c | (intptr_t) &a) & 65535 << 16;
  intptr_t e = (intptr_t) c;
  if (d != (e & 65535 << 16))
    return 1;
  return 0;
}


More information about the Gcc-bugs mailing list