public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl@lucon.org>
To: olga@il.ibm.com
Cc: gcc-patches@gcc.gnu.org
Subject: PATCH: Fix ipa-struct-reorg.c
Date: Wed, 24 Oct 2007 20:23:00 -0000	[thread overview]
Message-ID: <20071024190509.GA20708@lucon.org> (raw)

On Linux/x86-64, I got

cc1: warnings being treated as errors
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/ipa-struct-reorg.c: In function
âeate_new_field_accâ/net/gnu-13/export/gnu/src/gcc/gcc/gcc/ipa-struct-reorg.c:960:
error: â.wrapâay be used uninitialized in this function
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/ipa-struct-reorg.c:960: note:
â.wrapâas declared here
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/ipa-struct-reorg.c:960: error:
â.domainâay be used uninitialized in this function
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/ipa-struct-reorg.c:960: note:
â.domainâas declared here
make[5]: *** [ipa-struct-reorg.o] Error 1

This patch works for me.


H.J.
---
2007-10-24  H.J. Lu  <hongjiu.lu@intel.com>

	* ipa-struct-reorg.c (replace_field_acc): Initialize wr.

--- gcc/ipa-struct-reorg.c.bad	2007-10-24 08:58:10.000000000 -0700
+++ gcc/ipa-struct-reorg.c	2007-10-24 12:01:26.000000000 -0700
@@ -959,7 +959,9 @@ replace_field_acc (struct field_access_s
   VEC (type_wrapper_t, heap) *wrapper = VEC_alloc (type_wrapper_t, heap, 10);
   type_wrapper_t wr;
   type_wrapper_t *wr_p = NULL;
-  
+
+  wr.wrap = 0;
+  wr.domain = 0;
   while (TREE_CODE (ref_var) == INDIRECT_REF
 	 || TREE_CODE (ref_var) == ARRAY_REF)
     {

             reply	other threads:[~2007-10-24 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 20:23 H.J. Lu [this message]
2007-10-24 21:02 ` Samuel Tardieu
2007-10-24 21:20   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071024190509.GA20708@lucon.org \
    --to=hjl@lucon.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=olga@il.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).