From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:31:42 +0000 (+0100) Subject: re PR bootstrap/51969 (trunk gcc unable to build gcc 4.6) X-Git-Tag: releases/gcc-4.6.3~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e3f8a30262f988bd062a6662c0b0c61bd9e884a;p=thirdparty%2Fgcc.git re PR bootstrap/51969 (trunk gcc unable to build gcc 4.6) PR bootstrap/51969 Backported from mainline 2011-11-08 Michael Matz * gengtype.c (write_field_root): Avoid out-of-scope access of newv. From-SVN: r184239 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00f9e96db31e..698804e460c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-14 Jakub Jelinek + + PR bootstrap/51969 + Backported from mainline + 2011-11-08 Michael Matz + + * gengtype.c (write_field_root): Avoid out-of-scope access of newv. + 2012-02-14 Bin Cheng Backport from mainline. diff --git a/gcc/gengtype.c b/gcc/gengtype.c index abf17f8e7f2a..6c0ca4a0bf15 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -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));