[lto] fix reading of CALL_EXPRs

Nathan Froyd froydnj@codesourcery.com
Mon Sep 10 18:42:00 GMT 2007


The patch below fixes an issue with reading in CALL_EXPRs.  We
weren't setting the type of the newly-created CALL_EXPR, which caused
segfaults later on.

With this patch, we can now process a simple factorial example with
lto1.

Patch approved by Kenny on IRC and committed.

-Nathan

2007-09-10  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.

Index: gcc/lto/lto-read.c
===================================================================
--- gcc/lto/lto-read.c	(revision 128347)
+++ gcc/lto/lto-read.c	(working copy)
@@ -708,6 +708,7 @@ input_expr_operand (struct input_block *
 	  TREE_OPERAND (result, i) 
 	    = input_expr_operand (ib, data_in, fn, 
 				  input_record_start (ib));
+        TREE_TYPE (result) = type;
       }
       break;
 



More information about the Gcc-patches mailing list