* PATCH: Fix ipa-struct-reorg.c
@ 2007-10-24 20:23 H.J. Lu
2007-10-24 21:02 ` Samuel Tardieu
0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2007-10-24 20:23 UTC (permalink / raw)
To: olga; +Cc: gcc-patches
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)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: Fix ipa-struct-reorg.c
2007-10-24 20:23 PATCH: Fix ipa-struct-reorg.c H.J. Lu
@ 2007-10-24 21:02 ` Samuel Tardieu
2007-10-24 21:20 ` H.J. Lu
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Tardieu @ 2007-10-24 21:02 UTC (permalink / raw)
To: gcc-patches
>>>>> "H.J." == H J Lu <hjl@lucon.org> writes:
H.J.> This patch works for me.
Your patch works but I prefer mine, as it keeps wr manipulation inside
the while() loop and makes it clear that only two cases are to be
considered.
Sam
--
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: Fix ipa-struct-reorg.c
2007-10-24 21:02 ` Samuel Tardieu
@ 2007-10-24 21:20 ` H.J. Lu
0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2007-10-24 21:20 UTC (permalink / raw)
To: Samuel Tardieu; +Cc: gcc-patches
On Wed, Oct 24, 2007 at 09:16:36PM +0200, Samuel Tardieu wrote:
> >>>>> "H.J." == H J Lu <hjl@lucon.org> writes:
>
> H.J.> This patch works for me.
>
> Your patch works but I prefer mine, as it keeps wr manipulation inside
> the while() loop and makes it clear that only two cases are to be
> considered.
You are right.
Thanks.
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-24 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 20:23 PATCH: Fix ipa-struct-reorg.c H.J. Lu
2007-10-24 21:02 ` Samuel Tardieu
2007-10-24 21:20 ` H.J. Lu
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).