https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70342
--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Fri May 6 10:50:03 2016 New Revision: 235958 URL: https://gcc.gnu.org/viewcvs?rev=235958&root=gcc&view=rev Log: PR sanitizer/70342 * fold-const.c (tree_single_nonzero_warnv_p): For TARGET_EXPR, use TARGET_EXPR_SLOT as a base. * g++.dg/ubsan/null-7.C: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/ubsan/null-7.C Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/fold-const.c branches/gcc-6-branch/gcc/testsuite/ChangeLog