[Bug middle-end/77594] New: double computation for __builtin_sub_overflow (0, ...)
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 14 21:57:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77594
Bug ID: 77594
Summary: double computation for __builtin_sub_overflow (0, ...)
Product: gcc
Version: 6.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: ebotcazou at gcc dot gnu.org
Target Milestone: ---
Compiling:
#include <stdbool.h>
bool my_neg_overflow (int a, int *res)
{
return __builtin_sub_overflow (0, a, res);
}
at -O0 yields a double computation, first an overflow-negate operation then an
overflow-sub operation. Probably a missing return in expand_arith_overflow.
More information about the Gcc-bugs
mailing list