r256186 - in /trunk/gcc: cp/ChangeLog cp/cp-gim...

jakub@gcc.gnu.org jakub@gcc.gnu.org
Wed Jan 3 20:37:00 GMT 2018


Author: jakub
Date: Wed Jan  3 20:37:41 2018
New Revision: 256186

URL: https://gcc.gnu.org/viewcvs?rev=256186&root=gcc&view=rev
Log:
	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.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr83555.C
    trunk/gcc/testsuite/g++.dg/ubsan/pr83555.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-gimplify.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list