Skip to content
Snippets Groups Projects
Commit 4088b790 authored by Marek Polacek's avatar Marek Polacek Committed by Marek Polacek
Browse files

re PR sanitizer/63839 (ICE: tree check: expected ssa_name, have var_decl in...

re PR sanitizer/63839 (ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable)

	PR sanitizer/63839
	* asan.c (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST,
	ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST): Define.
	* builtin-attrs.def (ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST):
	Define.
	* builtins.c (fold_builtin_0): Don't include ubsan.h.  Don't
	instrument BUILT_IN_UNREACHABLE here.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE): Make
	const.
	* sanopt.c (pass_sanopt::execute): Instrument BUILT_IN_UNREACHABLE.
	* tree-ssa-ccp.c (optimize_unreachable): Bail out if
	SANITIZE_UNREACHABLE.
	* ubsan.c (ubsan_instrument_unreachable): Rewrite for GIMPLE.
	* ubsan.h (ubsan_instrument_unreachable): Adjust declaration.
testsuite/
	* c-c++-common/ubsan/pr63839.c: New test.
	* c-c++-common/ubsan/unreachable-2.c: New test.

From-SVN: r217553
parent ba067536
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment