Commit 71c581e7 by Marek Polacek Committed by Marek Polacek

re PR sanitizer/55702 (ICE: in instrument_func_exit, at tsan.c:684 with…

re PR sanitizer/55702 (ICE: in instrument_func_exit, at tsan.c:684 with -fsanitize=thread and __builtin_return())

	PR sanitizer/55702
	* tsan.c (instrument_func_exit): Allow BUILT_IN_RETURN
	functions.

	* gcc.dg/pr55702.c: New test.

From-SVN: r197430
parent 4a32ef80
2013-04-03 Marek Polacek <polacek@redhat.com>
PR sanitizer/55702
* tsan.c (instrument_func_exit): Allow BUILT_IN_RETURN
functions.
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
......
2013-04-03 Marek Polacek <polacek@redhat.com>
PR sanitizer/55702
* gcc.dg/pr55702.c: New test.
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
......
/* PR sanitizer/55702 */
/* { dg-do compile { target { x86_64-*-linux* && lp64 } } } */
/* { dg-options "-fsanitize=thread" } */
void
foo ()
{
__builtin_return (0);
}
......@@ -681,7 +681,8 @@ instrument_func_exit (void)
{
gsi = gsi_last_bb (e->src);
stmt = gsi_stmt (gsi);
gcc_assert (gimple_code (stmt) == GIMPLE_RETURN);
gcc_assert (gimple_code (stmt) == GIMPLE_RETURN
|| gimple_call_builtin_p (stmt, BUILT_IN_RETURN));
loc = gimple_location (stmt);
builtin_decl = builtin_decl_implicit (BUILT_IN_TSAN_FUNC_EXIT);
g = gimple_build_call (builtin_decl, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment