c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR in unsigned type.
authorMarek Polacek <polacek@redhat.com>
Thu, 23 Oct 2014 13:02:02 +0000 (13:02 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 23 Oct 2014 13:02:02 +0000 (13:02 +0000)
commit59d7607aec61d173914f2af06097cd46d10d3504
tree1edda0380383b7032ab192738625e6065d9c5f35
parent0c9ef7adf7be25ebcdb39a638d1901acf9d949ba
c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR in unsigned type.

* c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
in unsigned type.

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

From-SVN: r216593
gcc/c-family/ChangeLog
gcc/c-family/c-ubsan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/undefined-2.c [new file with mode: 0644]