This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-20000306 ICE in `size_binop', at fold-const.c:1873
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: egcs-20000306 ICE in `size_binop', at fold-const.c:1873
- From: grahams <grahams at rcp dot co dot uk>
- Date: Sun, 12 Mar 2000 19:22:31 +0000
- CC: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <200003121601.e2CG17b18610@sleipnir.valparaiso.cl> <20000312091821C.mitchell@codesourcery.com>
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))));
==============================================================================