]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/testsuite/ChangeLog
PR c++/69922
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Feb 2016 22:01:24 +0000 (22:01 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Feb 2016 22:01:24 +0000 (22:01 +0000)
commit2cde02ad062bfb4c2fc230828755c4d669cf37aa
treeaa66bb95b65b601ee8e6a8fef70163aacf5b9226
parentf0ea75d154a38860e4fb59f84f6cc87fdf1de578
PR c++/69922
* class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
Avoid folding it.
* init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
tests.
* cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
unless they are folded into INTEGER_CST, error_mark_node or some
comparison with NULL, avoid folding them and use either the original
comparison or non-folded comparison of folded arguments.
* cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
comparison, don't fold the comparison right away.

* g++.dg/warn/Wnonnull-compare-6.C: New test.
* g++.dg/warn/Wnonnull-compare-7.C: New test.
* g++.dg/ubsan/pr69922.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233684 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-gimplify.c
gcc/cp/cp-ubsan.c
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr69922.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wnonnull-compare-6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wnonnull-compare-7.C [new file with mode: 0644]