Skip to content
Snippets Groups Projects
user avatar
Marek Polacek authored
	PR sanitizer/59333
	PR sanitizer/59397
	* ubsan.c: Include rtl.h and expr.h.
	(ubsan_encode_value): Add new parameter.  If expanding, assign
	a stack slot for DECL_RTL of the temporary and call expand_assignment.
	Handle BOOLEAN_TYPE and ENUMERAL_TYPE.
	(ubsan_build_overflow_builtin): Adjust ubsan_encode_value call.
	* ubsan.h (ubsan_encode_value): Adjust declaration.
	* internal-fn.c (ubsan_expand_si_overflow_addsub_check): Move
	ubsan_build_overflow_builtin above expand_normal call.  Surround this call
	with push_temp_slots and pop_temp_slots.
	(ubsan_expand_si_overflow_neg_check): Likewise.
	(ubsan_expand_si_overflow_mul_check): Likewise.
testsuite/
	* c-c++-common/ubsan/pr59333.c: New test.
	* c-c++-common/ubsan/pr59397.c: New test.

From-SVN: r205714
1769415d
History
This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.