This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix bootstrap in gcc/fortran/
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Paul Thomas <paulthomas2 at wanadoo dot fr>
- Date: Tue, 12 Jun 2007 08:02:55 +0200
- Subject: Fix bootstrap in gcc/fortran/
Hi all,
My i386-linux nightly autobuilder didn't bootstrap tonight due to:
/home/fxcoudert/gfortran_nightbuild/trunk/gcc/fortran/trans-common.c:
In function ‘create_common’:
/home/fxcoudert/gfortran_nightbuild/trunk/gcc/fortran/trans-common.c:
531: error: ‘field_init’ may be used uninitialized in this function
I think this can be fixed by the patch above, which I unfortunately
don't have time to test: but, if someone can confirm that it does
reenable bootstrap, please feel free to commit it!
Thanks,
FX
Index: trans-common.c
===================================================================
--- trans-common.c (revision 125637)
+++ trans-common.c (working copy)
@@ -528,7 +528,7 @@ create_common (gfc_common_head *com, seg
tree union_type;
tree *field_link;
tree field;
- tree field_init;
+ tree field_init = NULL_TREE;
record_layout_info rli;
tree decl;
bool is_init = false;
@@ -551,8 +551,6 @@ create_common (gfc_common_head *com, seg
artificial field that contains all the data. */
if (saw_equiv)
field = get_init_field (head, union_type, &field_init, rli);
- else
- field = NULL_TREE;
if (field != NULL_TREE)
{