isl_tab_pip.c: use_shifted: avoid invalid access on error path
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 4 Jun 2013 12:22:06 +0000 (14:22 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 4 Jun 2013 12:30:50 +0000 (14:30 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_tab_pip.c

index 6f4a2a7..6d8496e 100644 (file)
@@ -2729,6 +2729,8 @@ static struct isl_basic_set *drop_constant_terms(struct isl_basic_set *bset)
 
 static int use_shifted(struct isl_context_gbr *cgbr)
 {
 
 static int use_shifted(struct isl_context_gbr *cgbr)
 {
+       if (!cgbr->tab)
+               return 0;
        return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0;
 }
 
        return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0;
 }