Handle NULL def in build_cross_bb_scalars_def

2016-05-07  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/70956
	* graphite-scop-detection.c (build_cross_bb_scalars_def): Handle NULL
	def.

	* gcc.dg/graphite/pr70956.c: New test.

From-SVN: r235994
This commit is contained in:
Tom de Vries 2016-05-07 06:47:07 +00:00 committed by Tom de Vries
parent e22daa4bb5
commit 5ec4a8cd76
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2016-05-07 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/70956
* graphite-scop-detection.c (build_cross_bb_scalars_def): Handle NULL
def.
2016-05-07 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/sh-protos.h (sh_cbranch_distance): Declare new function.

View File

@ -1722,8 +1722,7 @@ static void
build_cross_bb_scalars_def (scop_p scop, tree def, basic_block def_bb,
vec<tree> *writes)
{
gcc_assert (def);
if (!is_gimple_reg (def))
if (!def || !is_gimple_reg (def))
return;
/* Do not gather scalar variables that can be analyzed by SCEV as they can be

View File

@ -1,3 +1,8 @@
2016-05-07 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/70956
* gcc.dg/graphite/pr70956.c: New test.
2016-05-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/70941

View File

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fgraphite-identity" } */
#include "../tree-ssa/vrp66.c"