Commit 770cf505 by Jakub Jelinek Committed by Jakub Jelinek

re PR sanitizer/83219 (c-c++-common/ubsan/unreachable-2.c fails starting with r255201)

	PR sanitizer/83219
	* tree-cfg.c: Include asan.h.
	(gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.

From-SVN: r255295
parent 852f7e6f
2017-12-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83219
* tree-cfg.c: Include asan.h.
(gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
2017-12-01 Sergey Shalnov <Sergey.Shalnov@intel.com>
* config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
......@@ -61,6 +61,7 @@ along with GCC; see the file COPYING3. If not see
#include "attribs.h"
#include "selftest.h"
#include "opts.h"
#include "asan.h"
/* This file contains functions for building the Control Flow Graph (CFG)
for a function tree. */
......@@ -469,7 +470,12 @@ computed_goto_p (gimple *t)
bool
gimple_seq_unreachable_p (gimple_seq stmts)
{
if (stmts == NULL)
if (stmts == NULL
/* Return false if -fsanitize=unreachable, we don't want to
optimize away those calls, but rather turn them into
__ubsan_handle_builtin_unreachable () or __builtin_trap ()
later. */
|| sanitize_flags_p (SANITIZE_UNREACHABLE))
return false;
gimple_stmt_iterator gsi = gsi_last (stmts);
......
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