fold-const.c (fold_negate_expr): Don't fold INTEGER_CST if that overflows when...
fold-const.c (fold_negate_expr): Don't fold INTEGER_CST if that overflows when SANITIZE_SI_OVERFLOW is on. * fold-const.c (fold_negate_expr): Don't fold INTEGER_CST if that overflows when SANITIZE_SI_OVERFLOW is on. Guard -(-A) folding with TYPE_OVERFLOW_SANITIZED. * c-c++-common/ubsan/overflow-negate-3.c: New test. From-SVN: r217556
Showing
- gcc/ChangeLog 6 additions, 0 deletionsgcc/ChangeLog
- gcc/fold-const.c 5 additions, 2 deletionsgcc/fold-const.c
- gcc/testsuite/ChangeLog 4 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/ubsan/overflow-negate-3.c 21 additions, 0 deletionsgcc/testsuite/c-c++-common/ubsan/overflow-negate-3.c
Loading
Please register or sign in to comment