https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80875
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Fri May 26 11:15:37 2017 New Revision: 248490 URL: https://gcc.gnu.org/viewcvs?rev=248490&root=gcc&view=rev Log: PR sanitizer/80875 * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1 can be negated. * c-c++-common/ubsan/pr80875.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/c-c++-common/ubsan/pr80875.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/fold-const.c branches/gcc-7-branch/gcc/testsuite/ChangeLog