This is the mail archive of the
mailing list for the GCC project.
Re: bug fix for array references
- To: Peter Gerwinski <peter at gerwinski dot de>, egcs-patches at cygnus dot com
- Subject: Re: bug fix for array references
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sat, 29 Aug 1998 16:50:53 -0700
- Cc: Matthias Klose <doko at cs dot tu-berlin dot de>
- References: <19980828154401.E907@esmeralda.gerwinski.de>
- Reply-To: Richard Henderson <rth at cygnus dot com>
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.