From e54bd4ab156d04ee02da62008d34c7eaba498d5e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Thu, 15 Jan 2015 14:08:44 +0100
Subject: [PATCH] gengtype.c (create_user_defined_type): Workaround
 -Wmaybe-uninitialized false positives.

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

From-SVN: r219652
---
 gcc/ChangeLog        | 7 +++++++
 gcc/cse.c            | 6 ++++--
 gcc/gengtype.c       | 4 +++-
 gcc/loop-invariant.c | 4 +++-
 4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ad0ce7f94eee..34f7feed1d72 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-15  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.
+
 2015-01-15  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* expr.c (expand_expr_real_1) <normal_inner_ref>: Use the expression to
diff --git a/gcc/cse.c b/gcc/cse.c
index ec64ffa004b8..8806197730ca 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3093,8 +3093,10 @@ fold_rtx (rtx x, rtx_insn *insn)
   int changed = 0;
 
   /* Operands of X.  */
-  rtx folded_arg0;
-  rtx folded_arg1;
+  /* Workaround -Wmaybe-uninitialized false positive during
+     profiledbootstrap by initializing them.  */
+  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.  */
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 9f805b546d16..19cdc52bbfa7 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -611,7 +611,9 @@ create_user_defined_type (const char *type_name, struct fileloc *pos)
 	 comma-separated list of strings, implicitly assumed to
 	 be type names, potentially with "*" characters.  */
       char *arg = open_bracket + 1;
-      char *next;
+      /* Workaround -Wmaybe-uninitialized false positive during
+	 profiledbootstrap by initializing it.  */
+      char *next = NULL;
       char *type_id = strtoken (arg, ",>", &next);
       pair_p fields = 0;
       while (type_id)
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index be9078cabaa1..e5eb9e6366e6 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1268,7 +1268,9 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
 		    bool speed, bool call_p)
 {
   int comp_cost, size_cost;
-  enum reg_class cl;
+  /* Workaround -Wmaybe-uninitialized false positive during
+     profiledbootstrap by initializing it.  */
+  enum reg_class cl = NO_REGS;
   int ret;
 
   actual_stamp++;