re PR sanitizer/64906 (-fsanitize=integer-divide-by-zero creates false -Wmaybe-uninit...
authorMarek Polacek <polacek@redhat.com>
Fri, 25 Sep 2015 09:50:29 +0000 (09:50 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 25 Sep 2015 09:50:29 +0000 (09:50 +0000)
commit15dbc1a6df73343e769a8e310c1ed89829b61613
treebce2a9d14d5ecf32f4056017dc04cade4e2301c4
parent89e5941d8c79863857a60a41ce58d6a984df1bdf
re PR sanitizer/64906 (-fsanitize=integer-divide-by-zero creates false -Wmaybe-uninitialized warning)

PR sanitizer/64906
* c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.

* c-c++-common/ubsan/pr64906.c: New test.

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