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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Why do you use LLONG_MIN for long variable?
Better testcase:
int
main ()
{
  long long l = -__LONG_LONG_MAX__ - 1;
  int i = 0;
  i -= l;
  i = -l;
  return 0;
}

This is the effect of premature optimization in convert.c, perhaps for
-fsanitize=signed-integer-overflow we should punt in do_narrow if the argument
type is signed.

Reply via email to