re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)
authorMarek Polacek <polacek@redhat.com>
Fri, 7 Apr 2017 17:51:55 +0000 (17:51 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 7 Apr 2017 17:51:55 +0000 (17:51 +0000)
commit1ef532f452a10223cf9cd8f6955f066149d78498
treec3056a470e965614fe4e03e803e87f816e4211a5
parent29d8aae6bdb1fba656e0c4f768743015c96bc238
re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)

PR sanitizer/80348
* typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.

* g++.dg/ubsan/div-by-zero-2.C: New test.

From-SVN: r246770
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/div-by-zero-2.C [new file with mode: 0644]