Replace unsigned long with __SIZE_TYPE__

	* g++.dg/ipa/pr63894.C (new): Replace unsigned long with
	__SIZE_TYPE__.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217654 138bc75d-0d04-0410-961f-82ee72b054a4
	* tree-core.h (built_in_class): Add builtin codes to be used
	by Pointer Bounds Checker for instrumented builtin functions.
	* tree-streamer-in.c: Include ipa-chkp.h.
	(streamer_get_builtin_tree): Created instrumented decl if
	required.
	* ipa-chkp.h (chkp_maybe_clone_builtin_fndecl): New.
	* ipa-chkp.c (chkp_build_instrumented_fndecl): Support builtin
	function decls.
	(chkp_maybe_clone_builtin_fndecl): New.
	(chkp_maybe_create_clone): Support builtin function decls.
	(chkp_versioning): Clone builtin functions.
	* tree-chkp.c (chkp_instrument_normal_builtin): New.
	(chkp_add_bounds_to_call_stmt): Support builtin functions.
	(chkp_replace_function_pointer): Likewise.
	* builtins.c (expand_builtin_memcpy_args): New.
	(expand_builtin_memcpy): Call expand_builtin_memcpy_args.
	(expand_builtin_memcpy_with_bounds): New.
	(expand_builtin_mempcpy_with_bounds): New.
	(expand_builtin_mempcpy_args): Add orig_exp arg. Support
	BUILT_IN_CHKP_MEMCPY_NOBND_NOCHK
	(expand_builtin_memset_with_bounds): New.
	(expand_builtin_memset_args): Support BUILT_IN_CHKP_MEMSET_NOBND_NOCHK.
	(expand_builtin_with_bounds): New.
	* builtins.h (expand_builtin_with_bounds): New.
	* expr.c (expand_expr_real_1): Support instrumented builtin calls.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217655 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/

	* tree-chkp-opt.c (chkp_get_nobnd_fndecl): New.
	(chkp_get_nochk_fndecl): New.
	(chkp_optimize_string_function_calls): New.
	(chkp_opt_execute): Call chkp_optimize_string_function_calls.
	* tree-cfg.h (insert_cond_bb): New.
	* tree-cfg.c (insert_cond_bb): New.

gcc/testsuite/

	* gcc.target/i386/chkp-stropt-1.c: New.
	* gcc.target/i386/chkp-stropt-2.c: New.
	* gcc.target/i386/chkp-stropt-3.c: New.
	* gcc.target/i386/chkp-stropt-4.c: New.
	* gcc.target/i386/chkp-stropt-5.c: New.
	* gcc.target/i386/chkp-stropt-6.c: New.
	* gcc.target/i386/chkp-stropt-7.c: New.
	* gcc.target/i386/chkp-stropt-8.c: New.
	* gcc.target/i386/chkp-stropt-9.c: New.
	* gcc.target/i386/chkp-stropt-10.c: New.
	* gcc.target/i386/chkp-stropt-11.c: New.
	* gcc.target/i386/chkp-stropt-12.c: New.
	* gcc.target/i386/chkp-stropt-13.c: New.
	* gcc.target/i386/chkp-stropt-14.c: New.
	* gcc.target/i386/chkp-stropt-15.c: New.
	* gcc.target/i386/chkp-stropt-16.c: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217656 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/

	* tree-ssa-strlen.c: include ipa-chkp.h, cgraph.h,
	ipa-ref.h, plugin-api.h.
	(get_string_length): Handle calls with bounds.
	(adjust_last_stmt): Likewise.
	(handle_builtin_strchr): Likewise.
	(handle_builtin_strcpy): Likewise.
	(handle_builtin_memcpy): Likewise.
	(handle_builtin_strcat): Likewise.

gcc/testsuite/

	* gcc.target/i386/chkp-strlen-1.c: New.
	* gcc.target/i386/chkp-strlen-2.c: New.
	* gcc.target/i386/chkp-strlen-3.c: New.
	* gcc.target/i386/chkp-strlen-4.c: New.
	* gcc.target/i386/chkp-strlen-5.c: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217657 138bc75d-0d04-0410-961f-82ee72b054a4