tree-sra.c (try_instantiate_multiple_fields): Needlessly initialize align to silence...
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 5 Apr 2007 21:10:26 +0000 (21:10 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 5 Apr 2007 21:10:26 +0000 (21:10 +0000)
* tree-sra.c (try_instantiate_multiple_fields): Needlessly
initialize align to silence bogus warning.

From-SVN: r123526

gcc/ChangeLog
gcc/tree-sra.c

index 330c180590a1e65fe6a9e7ee6118e9249ece5e19..4f5f8f5df4a5d8dafb9639a7e4410d91c5e4a650 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
+
+       * tree-sra.c (try_instantiate_multiple_fields): Needlessly
+       initialize align to silence bogus warning.
+
 2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
 
        PR middle-end/22156
index a73f22d69fce0d99aebbb24a2f45a6fa570ac9bf..0f76bb5831d57ac02cae46d93f079221713b8620 100644 (file)
@@ -1431,7 +1431,11 @@ try_instantiate_multiple_fields (struct sra_elt *elt, tree f)
     return f;
 
   /* Taking the alignment of elt->element is not enough, since it
-     might be just an array index or some such.  */
+     might be just an array index or some such.  We shouldn't need to
+     initialize align here, but our optimizers don't always realize
+     that, if we leave the loop without initializing align, we'll fail
+     the assertion right after the loop.  */
+  align = (unsigned HOST_WIDE_INT)-1;
   for (block = elt; block; block = block->parent)
     if (DECL_P (block->element))
       {