public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/guojiufu-branch)] PR bootstrap/95555 - powepc64 bootstrap failure due to -Wmaybe-uninitialized in reload_cse_simplify_
@ 2020-06-10 3:45 Jiu Fu Guo
0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2020-06-10 3:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c1057cc0a8ad972e0a2218ab74038a56e5514c39
commit c1057cc0a8ad972e0a2218ab74038a56e5514c39
Author: Martin Sebor <msebor@redhat.com>
Date: Mon Jun 8 09:06:48 2020 -0600
PR bootstrap/95555 - powepc64 bootstrap failure due to -Wmaybe-uninitialized in reload_cse_simplify_operands
gcc/ChangeLog:
* postreload.c (reload_cse_simplify_operands): Clear first array element
before using it. Assert a precondition.
Diff:
---
gcc/postreload.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/postreload.c b/gcc/postreload.c
index f6258285022..c9e637500f1 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -592,6 +592,13 @@ reload_cse_simplify_operands (rtx_insn *insn, rtx testreg)
}
}
+ /* The loop below sets alternative_order[0] but -Wmaybe-uninitialized
+ can't know that. Clear it here to avoid the warning. */
+ alternative_order[0] = 0;
+ gcc_assert (!recog_data.n_alternatives
+ || (which_alternative >= 0
+ && which_alternative < recog_data.n_alternatives));
+
/* Record all alternatives which are better or equal to the currently
matching one in the alternative_order array. */
for (i = j = 0; i < recog_data.n_alternatives; i++)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-10 3:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 3:45 [gcc(refs/users/guojiufu/heads/guojiufu-branch)] PR bootstrap/95555 - powepc64 bootstrap failure due to -Wmaybe-uninitialized in reload_cse_simplify_ Jiu Fu Guo
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).