[Bug sanitizer/58413] ubsan constant folding
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 25 08:59:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58413
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Sep 25 08:58:57 2013
New Revision: 202886
URL: http://gcc.gnu.org/viewcvs?rev=202886&root=gcc&view=rev
Log:
PR sanitizer/58413
c-family/
* c-ubsan.c (ubsan_instrument_shift): Don't instrument
an expression if we can prove it is correct.
(ubsan_instrument_division): Likewise. Remove unnecessary
check.
testsuite/
* c-c++-common/ubsan/shift-5.c: New test.
* c-c++-common/ubsan/shift-6.c: New test.
* c-c++-common/ubsan/div-by-zero-5.c: New test.
* gcc.dg/ubsan/c-shift-1.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/ubsan/div-by-zero-5.c
trunk/gcc/testsuite/c-c++-common/ubsan/shift-5.c
trunk/gcc/testsuite/c-c++-common/ubsan/shift-6.c
trunk/gcc/testsuite/gcc.dg/ubsan/c-shift-1.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-ubsan.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list