This is the mail archive of the gcc-patches@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]

Re: bug fix for array references


On Fri, Aug 28, 1998 at 03:44:01PM +0200, Peter Gerwinski wrote:
> I suspect that there is a bug in `expr.c'.  When expanding an
> array reference with a non-constant index, `copy_to_mode_reg()'
> (called from `expand_mult()') barfs about incompatible modes on
> machines where `sizetype' is not `int', e.g. the Alpha.

I would be interested in seeing a testcase for this.  Strange
that it hasn't shown up for me before...

Anyway, assuming this is necessary, there is a better fix in

-          if (TREE_CODE (index) == INTEGER_CST)
-            {
               index = convert (sbitsizetype, index);
               index_type = TREE_TYPE (index);
-            }

immediately above that first multiplication.



r~


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