From 6652875ffe9269a326cf7b3f17e7446079ba11d5 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Thu, 1 Oct 2015 22:04:07 +0000 Subject: correctly handle non affine data references 2015-10-01 Sebastian Pop Aditya Kumar PR tree-optimization/66980 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false when data reference analysis has failed. Co-Authored-By: Aditya Kumar From-SVN: r228357 --- gcc/graphite-scop-detection.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/graphite-scop-detection.c') diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index c45df55..dee4f86 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -274,6 +274,13 @@ stmt_has_simple_data_refs_p (sese_l scop, gimple *stmt) FOR_EACH_VEC_ELT (drs, j, dr) { int nb_subscripts = DR_NUM_DIMENSIONS (dr); + + if (nb_subscripts < 1) + { + free_data_refs (drs); + return false; + } + tree ref = DR_REF (dr); for (int i = nb_subscripts - 1; i >= 0; i--) -- cgit v1.1