diff mbox

[graphite] Fix PR44726: avoid uninitialized variables

Message ID AANLkTimaOf0QwpJgKvqWt-EzGeIfk8VXSCliA0smpHCk@mail.gmail.com
State New
Headers show

Commit Message

Sebastian Pop June 30, 2010, 4:32 p.m. UTC
Hi,

I will commit this patch to trunk after it passes regstrap on amd64-linux.

Sebastian Pop
--
AMD / Open Source Compiler Engineering / GNU Tools

Comments

Richard Biener June 30, 2010, 6:35 p.m. UTC | #1
On Wed, Jun 30, 2010 at 6:32 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> I will commit this patch to trunk after it passes regstrap on amd64-linux.

Bootstrap & regtest passed for me on x86_64-linux, so I applied the patch
to unbreak bootstrap for me before the freeze.

Richard.

> Sebastian Pop
> --
> AMD / Open Source Compiler Engineering / GNU Tools
>
Sebastian Pop June 30, 2010, 7:29 p.m. UTC | #2
On Wed, Jun 30, 2010 at 13:35, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Wed, Jun 30, 2010 at 6:32 PM, Sebastian Pop <sebpop@gmail.com> wrote:
>> Hi,
>>
>> I will commit this patch to trunk after it passes regstrap on amd64-linux.
>
> Bootstrap & regtest passed for me on x86_64-linux, so I applied the patch
> to unbreak bootstrap for me before the freeze.
>

Thanks, it also passed regstrap on my machine.

Sebastian
diff mbox

Patch

From 4609d525c740b8d6710bd6f5e009431341e6dc7b Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Wed, 30 Jun 2010 11:21:49 -0500
Subject: [PATCH 2/2] Fix PR44726: use gcc_assert to avoid uninitialized variables.

---
 gcc/graphite-sese-to-poly.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index b73517d..7f83ffc 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -1778,10 +1778,11 @@  build_poly_dr (data_reference_p dr, poly_bb_p pbb)
 							    accesses);
   ppl_delete_Polyhedron (accesses);
 
-  if (dr->aux)
-    dr_base_object_set = ((base_alias_pair *)(dr->aux))->base_obj_set;
+  gcc_assert (dr->aux);
+  dr_base_object_set = ((base_alias_pair *)(dr->aux))->base_obj_set;
 
-  new_poly_dr (pbb, dr_base_object_set, accesses_ps, DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
+  new_poly_dr (pbb, dr_base_object_set, accesses_ps,
+	       DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
 	       dr, DR_NUM_DIMENSIONS (dr));
 }
 
@@ -1923,8 +1924,8 @@  build_alias_set_optimal_p (VEC (data_reference_p, heap) *drs)
       data_reference_p dr = VEC_index (data_reference_p, drs, i);
       base_alias_pair *bap;
 
-      if (dr->aux)
-	bap = (base_alias_pair *)(dr->aux);
+      gcc_assert (dr->aux);
+      bap = (base_alias_pair *)(dr->aux);
 
       bap->alias_set = XNEW (int);
       *(bap->alias_set) = g->vertices[i].component + 1;
@@ -2002,8 +2003,8 @@  build_base_obj_set_for_drs (VEC (data_reference_p, heap) *drs)
       data_reference_p dr = VEC_index (data_reference_p, drs, i);
       base_alias_pair *bap;
 
-      if (dr->aux)
-	bap = (base_alias_pair *)(dr->aux);
+      gcc_assert (dr->aux);
+      bap = (base_alias_pair *)(dr->aux);
 
       bap->base_obj_set = g->vertices[i].component + 1;
     }
-- 
1.7.0.4