diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-03 21:37:41 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-03 21:37:41 +0100 |
commit | 830421fcd37719426fa8eb7f0d545c744db497b4 (patch) | |
tree | 4caa4cc0a2b0794c69cc3be5c592273f1dbcc26b /gcc/gimple-ssa-sprintf.c | |
parent | 8bdbeed1d0b00bc21a105712b1b672ebec37358e (diff) | |
download | gcc-830421fcd37719426fa8eb7f0d545c744db497b4.tar.gz |
re PR c++/83555 (Unnecessary null check when static_cast is used with references.)
PR c++/83555
* typeck.c (build_static_cast_1): For static casts to reference types,
call build_base_path with flag_delete_null_pointer_checks as nonnull
instead of always false. When -fsanitize=null, call
ubsan_maybe_instrument_reference on the NULL reference INTEGER_CST.
* cp-gimplify.c (cp_genericize_r): Don't walk subtrees of UBSAN_NULL
call if the first argument is INTEGER_CST with REFERENCE_TYPE.
* g++.dg/opt/pr83555.C: New test.
* g++.dg/ubsan/pr83555.C: New test.
From-SVN: r256186
Diffstat (limited to 'gcc/gimple-ssa-sprintf.c')
0 files changed, 0 insertions, 0 deletions