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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
In fact we get it wrong even if both branches call the same noreturn function:

  if (PREDICT(n > (__PTRDIFF_MAX__ / sizeof(T))))
  {
    if (n > (__SIZE_MAX__ / sizeof(T)))
      throw1();
    throw1();
  }


This is not compiled to the same code as:

  if (PREDICT(n > (__PTRDIFF_MAX__ / sizeof(T))))
  {
    throw1();
  }

even though it has identical effects.

Reply via email to