]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR sanitizer/60613 (Invalid signed subtraction ubsan diagnostics)
authorJakub Jelinek <jakub@redhat.com>
Sat, 22 Mar 2014 16:25:50 +0000 (17:25 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 22 Mar 2014 16:25:50 +0000 (17:25 +0100)
commitf451d3a836fff435bc4bc0ed121cdc5f6e6c14d6
tree99eaf3733d043efe30616738f13338abe2c28621
parent3db31fd1cc7acf87e092c0bbeba37d234c77b83b
re PR sanitizer/60613 (Invalid signed subtraction ubsan diagnostics)

PR sanitizer/60613
* internal-fn.c (ubsan_expand_si_overflow_addsub_check): For
code == MINUS_EXPR, never swap op0 with op1.

* c-c++-common/ubsan/pr60613-1.c: New test.
* c-c++-common/ubsan/pr60613-2.c: New test.

From-SVN: r208766
gcc/ChangeLog
gcc/internal-fn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr60613-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/pr60613-2.c [new file with mode: 0644]