re PR middle-end/77594 (double computation for __builtin_sub_overflow (0, ...))
authorJakub Jelinek <jakub@redhat.com>
Fri, 16 Sep 2016 07:09:27 +0000 (09:09 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 16 Sep 2016 07:09:27 +0000 (09:09 +0200)
commit7d704548e7aabca540cc173f70df1e0dcfc6304c
tree13801b02aa4d59b734c19f7511e572c11dd58192
parentff18118fba30ff4befcf94eba9b239a4fe6f3a6c
re PR middle-end/77594 (double computation for __builtin_sub_overflow (0, ...))

PR middle-end/77594
* internal-fn.c (expand_arith_overflow) <case MINUS_EXPR>: Don't fall
through into expand_addsub_overflow after expand_neg_overflow.

* gcc.target/i386/pr77594.c: New test.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r240173
gcc/ChangeLog
gcc/internal-fn.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr77594.c [new file with mode: 0644]