Re: RFC: Avoid calling convert_to_mode with invalid rtl.

2015-03-17 Thread Eric Botcazou
> What do you think of the attached patch ? Is it suitable for submission > once the sources are out of stage 4 ? (No regressions with an > x86_64-pc-linux-gnu toolchain and several fixes for an rl78-elf toolchain). Yes, I think it's appropriate for the next stage 1, bearing in mind that there

Re: RFC: Avoid calling convert_to_mode with invalid rtl.

2015-03-16 Thread Nicholas Clifton
Hi Eric, Note that the very same code is in expand_assignment, so they probably should be kept in sync. Oops - I had missed that. The patch adds a second call to expand_expr(), giving the address mode as the suggested mode, and using a normal expansion, rather than EXPAND_SUM. This

Re: RFC: Avoid calling convert_to_mode with invalid rtl.

2015-03-16 Thread Eric Botcazou
> if (offset) > { > machine_mode address_mode; > rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, > EXPAND_SUM); > > gcc_assert (MEM_P (op0)); > > address_mode = get_address_mode (op0); >

RFC: Avoid calling convert_to_mode with invalid rtl.

2015-03-13 Thread Nick Clifton
Hi Guys, A bug reported against the RL78 port has a uncovered a generic problem with expand_expr_real_1() function - part of the code their computes the offset of an address for an array reference, and if necessary makes sure that it is in the correct mode: if (offset) {