egcs-20000306 ICE in `size_binop', at fold-const.c:1873

grahams grahams@rcp.co.uk
Sun Mar 12 11:25:00 GMT 2000


Mark

Here's a patch but I'm not sure if it's technically correct.

With the patch applied the test case compiles on x86 and the
generated code looks correct.

Graham

Changelog
	* (get_inner_reference): Convert offset to correct 'size type'.

=============================expr.c.diff=====================================
*** expr.c	Wed Mar  8 12:29:58 2000
--- expr.c.new	Sun Mar 12 19:03:04 2000
*************** get_inner_reference (exp, pbitsize, pbit
*** 4992,4998 ****
  
  	  *pbitpos += TREE_INT_CST_LOW (constant);
  	  offset
! 	    = size_binop (PLUS_EXPR, offset,
  			  convert (sizetype,
  				   size_binop (EXACT_DIV_EXPR, var,
  					       bitsize_int (BITS_PER_UNIT))));
--- 4992,4998 ----
  
  	  *pbitpos += TREE_INT_CST_LOW (constant);
  	  offset
! 	    = size_binop (PLUS_EXPR, convert (sizetype, offset),
  			  convert (sizetype,
  				   size_binop (EXACT_DIV_EXPR, var,
  					       bitsize_int (BITS_PER_UNIT))));
==============================================================================


More information about the Gcc-patches mailing list