This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/2] ipa-struct-reorg.c: Fix bootstrap error on x86
- From: Olga Golovanevsky <OLGA at il dot ibm dot com>
- To: Samuel Tardieu <sam at rfc1149 dot net>
- Cc: gcc-patches at gcc dot gnu dot org, "H.J. Lu" <hjl at lucon dot org>
- Date: Wed, 24 Oct 2007 23:19:52 +0200
- Subject: Re: [PATCH 2/2] ipa-struct-reorg.c: Fix bootstrap error on x86
Samuel Tardieu wrote on 24/10/2007 21:01:06:
> (warning treated as error)
>
> 2007-10-24 Samuel Tardieu <sam@rfc1149.net>
>
> * ipa-struct-reorg.c (replace_field_acc): Make it clear to
> the compiler that wr.wrap and wr.domain are initialized in
> any case.
Ok, but slightly different.
Olga
Index: ipa-struct-reorg.c
===================================================================
--- ipa-struct-reorg.c (revision 129611)
+++ ipa-struct-reorg.c (working copy)
@@ -957,18 +957,19 @@
tree new_acc;
tree field_id = DECL_NAME (acc->field_decl);
VEC (type_wrapper_t, heap) *wrapper = VEC_alloc (type_wrapper_t, heap,
10);
- type_wrapper_t wr;
type_wrapper_t *wr_p = NULL;
while (TREE_CODE (ref_var) == INDIRECT_REF
|| TREE_CODE (ref_var) == ARRAY_REF)
{
+ type_wrapper_t wr;
+
if ( TREE_CODE (ref_var) == INDIRECT_REF)
{
wr.wrap = 0;
wr.domain = 0;
}
- else if (TREE_CODE (ref_var) == ARRAY_REF)
+ else
{
wr.wrap = 1;
wr.domain = TREE_OPERAND (ref_var, 1);