]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/51969 (trunk gcc unable to build gcc 4.6)
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Feb 2012 23:31:42 +0000 (00:31 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 Feb 2012 23:31:42 +0000 (00:31 +0100)
PR bootstrap/51969
Backported from mainline
2011-11-08  Michael Matz  <matz@suse.de>

* gengtype.c (write_field_root): Avoid out-of-scope access of newv.

From-SVN: r184239

gcc/ChangeLog
gcc/gengtype.c

index 00f9e96db31e7fcac82b8d7a81fb5b896e64d562..698804e460c2c31652e6c8241a504e5f04cde0e0 100644 (file)
@@ -1,3 +1,11 @@
+2012-02-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/51969
+       Backported from mainline
+       2011-11-08  Michael Matz  <matz@suse.de>
+
+       * gengtype.c (write_field_root): Avoid out-of-scope access of newv.
+
 2012-02-14  Bin Cheng  <bin.cheng@arm.com>
 
        Backport from mainline.
index abf17f8e7f2a38ae8f2d1323ab7e8b32597d684c..6c0ca4a0bf150cb1d3c7aa67291da7881ede10d4 100644 (file)
@@ -3594,14 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name,
                  int has_length, struct fileloc *line, const char *if_marked,
                  bool emit_pch, type_p field_type, const char *field_name)
 {
+  struct pair newv;
   /* If the field reference is relative to V, rather than to some
      subcomponent of V, we can mark any subarrays with a single stride.
      We're effectively treating the field as a global variable in its
      own right.  */
   if (v && type == v->type)
     {
-      struct pair newv;
-
       newv = *v;
       newv.type = field_type;
       newv.name = ACONCAT ((v->name, ".", field_name, NULL));