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
This commit is contained in:
Jakub Jelinek 2019-04-19 13:58:11 +02:00 committed by Jakub Jelinek
parent 7296c0c537
commit a7bfaee58f
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1,5 +1,8 @@
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.

View File

@ -0,0 +1,20 @@
/* 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);
}
}

View File

@ -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)));