Commit cddddfff by Jeff Law Committed by Jeff Law

re PR middle-end/54041 (-mshort ICE in convert_memory_address_addr_space, at explow.c:327)

	PR middle-end/54041
	* expr.c (expand_expr_addr_expr_1): Handle expand_expr returning an
	object with an undesirable mode.

	PR middle-end/54041
	* gcc.target/m68k/pr54041.c: New test.

From-SVN: r207689
parent 7c1aef7e
2014-02-11 Jeff Law <law@redhat.com>
PR middle-end/54041
* expr.c (expand_expr_addr_expr_1): Handle expand_expr returning an
object with an undesirable mode.
2014-02-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgomp/60107
......
......@@ -7708,6 +7708,11 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
modifier == EXPAND_INITIALIZER
? EXPAND_INITIALIZER : EXPAND_NORMAL);
/* expand_expr is allowed to return an object in a mode other
than TMODE. If it did, we need to convert. */
if (GET_MODE (tmp) != VOIDmode && tmode != GET_MODE (tmp))
tmp = convert_modes (tmode, GET_MODE (tmp),
tmp, TYPE_UNSIGNED (TREE_TYPE (offset)));
result = convert_memory_address_addr_space (tmode, result, as);
tmp = convert_memory_address_addr_space (tmode, tmp, as);
......
2014-02-11 Jeff Law <law@redhat.com>
PR middle-end/54041
* gcc.target/m68k/pr54041.c: New test.
2014-02-11 Jakub Jelinek <jakub@redhat.com>
PR target/59927
......
/* { dg-do compile } */
/* { dg-options "-O -mshort" } */
extern int r[];
int *fn(int i)
{
return &r[i];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment