Commit a7bfaee5 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/90139 (ICE in emit_block_move_hints, at expr.c:1601)

	PR middle-end/90139
	* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
	assign_temp instead of gen_reg_rtx.

	* gcc.c-torture/compile/pr90139.c: New test.

From-SVN: r270457
parent 7296c0c5
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/90139
* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
assign_temp instead of gen_reg_rtx.
2019-04-19 Christophe Lyon <christophe.lyon@linaro.org>
PR translation/90118
......
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/90139
* gcc.c-torture/compile/pr90139.c: New test.
PR c++/90138
* g++.dg/template/pr90138.C: New test.
......
/* PR middle-end/90139 */
typedef float __attribute__((vector_size (sizeof (float)))) V;
void bar (int, V *);
int l;
void
foo (void)
{
V n, b, o;
while (1)
switch (l)
{
case 0:
o = n;
n = b;
b = o;
bar (1, &o);
}
}
......@@ -653,6 +653,8 @@ get_temp_reg (tree name)
tree type = TREE_TYPE (name);
int unsignedp;
machine_mode reg_mode = promote_ssa_mode (name, &unsignedp);
if (reg_mode == BLKmode)
return assign_temp (type, 0, 0);
rtx x = gen_reg_rtx (reg_mode);
if (POINTER_TYPE_P (type))
mark_reg_pointer (x, TYPE_ALIGN (TREE_TYPE (type)));
......
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