public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Workaround -Wmaybe-uninitialized false positives during profiledbootstrap
@ 2015-01-15 11:23 Jakub Jelinek
  2015-01-15 11:27 ` Richard Biener
  0 siblings, 1 reply; 14+ messages in thread
From: Jakub Jelinek @ 2015-01-15 11:23 UTC (permalink / raw)
  To: gcc-patches

Hi!

I ran into -Werror=maybe-uninitialized errors during profiledbootstrap
(../configure --enable-languages=c,c++ --enable-checking=release;
make -j16 profiledboostrap) before I hit a miscompilation I'm going to file.

Is this ok for trunk, or do we want to work around them differently?

2015-01-14  Jakub Jelinek  <jakub@redhat.com>

	* gengtype.c (create_user_defined_type): Workaround
	-Wmaybe-uninitialized false positives.
	* cse.c (fold_rtx): Likewise.
	* loop-invariant.c (gain_for_invariant): Likewise.

--- gcc/gengtype.c.jj	2015-01-14 17:46:50.000000000 +0100
+++ gcc/gengtype.c	2015-01-14 18:15:19.285494736 +0100
@@ -611,7 +611,7 @@ create_user_defined_type (const char *ty
 	 comma-separated list of strings, implicitly assumed to
 	 be type names, potentially with "*" characters.  */
       char *arg = open_bracket + 1;
-      char *next;
+      char *next = NULL;
       char *type_id = strtoken (arg, ",>", &next);
       pair_p fields = 0;
       while (type_id)
--- gcc/cse.c.jj	2015-01-14 17:49:01.000000000 +0100
+++ gcc/cse.c	2015-01-14 19:02:40.638325329 +0100
@@ -3093,8 +3093,8 @@ fold_rtx (rtx x, rtx_insn *insn)
   int changed = 0;
 
   /* Operands of X.  */
-  rtx folded_arg0;
-  rtx folded_arg1;
+  rtx folded_arg0 = NULL_RTX;
+  rtx folded_arg1 = NULL_RTX;
 
   /* Constant equivalents of first three operands of X;
      0 when no such equivalent is known.  */
--- gcc/loop-invariant.c.jj	2015-01-14 17:50:10.000000000 +0100
+++ gcc/loop-invariant.c	2015-01-14 21:13:23.780857707 +0100
@@ -1268,7 +1268,7 @@ gain_for_invariant (struct invariant *in
 		    bool speed, bool call_p)
 {
   int comp_cost, size_cost;
-  enum reg_class cl;
+  enum reg_class cl = NO_REGS;
   int ret;
 
   actual_stamp++;

	Jakub

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-03-04 17:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15 11:23 [PATCH] Workaround -Wmaybe-uninitialized false positives during profiledbootstrap Jakub Jelinek
2015-01-15 11:27 ` Richard Biener
2015-01-15 11:41   ` Jakub Jelinek
2015-01-15 11:47     ` Richard Biener
2015-01-19 14:56       ` Martin Liška
2015-01-19 15:44         ` Jakub Jelinek
2015-01-19 18:53           ` Martin Liška
2015-01-22 18:30             ` Jeff Law
2015-01-27  5:38             ` DJ Delorie
2015-01-27 14:17               ` Martin Liška
2015-01-30 12:52                 ` Martin Liška
2015-01-30 13:03                   ` Jakub Jelinek
2015-03-04 13:18                 ` Martin Liška
2015-03-04 17:16                   ` Jeff Law

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).