aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2007-12-24 19:27:02 +0000
committerNathan Froyd <froydnj@codesourcery.com>2007-12-24 19:27:02 +0000
commitc139b13a1e2b3d8f4a60519f5d0e09e448257645 (patch)
tree35ebfd5e99dfd8ce34c0d9f4a13be7bbc9068f32
parentd76eeb7f5864b902865e842140167e1647ec1c7b (diff)
* lto-function-out.c (output_local_vars): Output DECL_INITIAL
regardless of whether we are outputting the function in which it was defined. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@131161 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.lto6
-rw-r--r--gcc/lto-function-out.c13
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index 18979370a9b..a823eef20ac 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,3 +1,9 @@
+2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
+
+ * lto-function-out.c (output_local_vars): Output DECL_INITIAL
+ regardless of whether we are outputting the function in which
+ it was defined.
+
2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
Kenneth Zadeck <zadeck@naturalbridge.com>
diff --git a/gcc/lto-function-out.c b/gcc/lto-function-out.c
index fae34e6dae4..d13da808880 100644
--- a/gcc/lto-function-out.c
+++ b/gcc/lto-function-out.c
@@ -1857,16 +1857,15 @@ output_local_vars (struct output_block *ob, struct function *fn)
if (DECL_CONTEXT (lv) == fn->decl)
{
output_uleb128 (ob, 1); /* Restore context. */
- if (DECL_INITIAL (lv))
- output_expr_operand (ob, DECL_INITIAL (lv));
- else
- output_zero (ob); /* DECL_INITIAL. */
}
- else
+ else
{
- output_zero (ob); /* Restore context. */
- output_zero (ob); /* DECL_INITIAL. */
+ output_zero (ob); /* Restore context. */
}
+ if (DECL_INITIAL (lv))
+ output_expr_operand (ob, DECL_INITIAL (lv));
+ else
+ output_zero (ob); /* DECL_INITIAL. */
}
}
else