re PR sanitizer/64717 (-fsanitize=vptr leads to warning: ‘<anonymous>’ may be used...
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 29 Jan 2015 20:40:07 +0000 (21:40 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 29 Jan 2015 20:40:07 +0000 (21:40 +0100)
commita7c3e87ed900cb2b6ff0f72292e8a18cb87187b6
treec120f358a21ea86209079717ef7ab2ac726a35b2
parentd240f6b36ae42145ba900e9534bd6fb305b30508
re PR sanitizer/64717 (-fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized])

PR c++/64717
* cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
into SAVE_EXPR.

* g++.dg/ubsan/pr64717-1.C: New test.
* g++.dg/ubsan/pr64717-2.C: New test.

From-SVN: r220262
gcc/cp/ChangeLog
gcc/cp/cp-ubsan.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr64717-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/pr64717-2.C [new file with mode: 0644]