This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] read RESULT_DECLs properly
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: zadeck at naturalbridge dot com
- Date: Thu, 13 Dec 2007 12:41:53 -0800
- Subject: [lto] read RESULT_DECLs properly
Apparently various deep and scary bits of the compiler don't like it
when they see a RESULT_DECL that is != to DECL_RESULT. We fixed a
problem like this before, but it didn't solve everything. This patch,
however, should.
Committed to the LTO branch.
-Nathan
* lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
RESULT_DECL.
Index: lto-read.c
===================================================================
--- lto-read.c (revision 130903)
+++ lto-read.c (working copy)
@@ -834,7 +834,7 @@ input_expr_operand (struct input_block *
case RESULT_DECL:
- result = build0 (code, type);
+ result = DECL_RESULT (current_function_decl);
add_referenced_var (result);
break;