This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: m32c build fails


On Sat, 5 Apr 2008, DJ Delorie wrote:

> 
> > Is this problem reproducible with a cross-compiler?
> 
> Yes, it's m32c-elf
> 
> > Can you open a bug-report and attach pre-processed source in that
> > case?
> 
> It's trying to cross-build libiberty, so just building shows the bug.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35834

I will apply the following if you confirm this fixes m32c-elf.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

Richard.

2008-04-05  Richard Guenther  <rguenther@suse.de>

	PR middle-end/35834
	* tree-ssa-address.c (create_mem_ref): Use POINTER_PLUS_EXPR
	for adding index to base.

Index: tree-ssa-address.c
===================================================================
--- tree-ssa-address.c	(revision 133937)
+++ tree-ssa-address.c	(working copy)
@@ -639,9 +639,9 @@ create_mem_ref (block_stmt_iterator *bsi
 	{
 	  atype = TREE_TYPE (parts.base);
 	  parts.base = force_gimple_operand_bsi (bsi,
-			fold_build2 (PLUS_EXPR, atype,
+			fold_build2 (POINTER_PLUS_EXPR, atype,
 				     parts.base,
-			    	     fold_convert (atype, parts.index)),
+			    	     parts.index),
 			true, NULL_TREE, true, BSI_SAME_STMT);
 	}
       else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]