Blame SOURCES/gcc8-pr90139.patch

745403
2019-04-19  Jakub Jelinek  <jakub@redhat.com>
745403
745403
	PR middle-end/90139
745403
	* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
745403
	assign_temp instead of gen_reg_rtx.
745403
745403
--- /dev/null
745403
+++ gcc/testsuite/gcc.c-torture/compile/pr90139.c
745403
@@ -0,0 +1,20 @@
745403
+/* PR middle-end/90139 */
745403
+
745403
+typedef float __attribute__((vector_size (sizeof (float)))) V;
745403
+void bar (int, V *);
745403
+int l;
745403
+
745403
+void
745403
+foo (void)
745403
+{
745403
+  V n, b, o;
745403
+  while (1)
745403
+    switch (l)
745403
+      {
745403
+      case 0:
745403
+	o = n;
745403
+	n = b;
745403
+	b = o;
745403
+	bar (1, &o);
745403
+      }
745403
+}
745403
--- gcc/tree-outof-ssa.c
745403
+++ gcc/tree-outof-ssa.c
745403
@@ -653,6 +653,8 @@ get_temp_reg (tree name)
745403
   tree type = TREE_TYPE (name);
745403
   int unsignedp;
745403
   machine_mode reg_mode = promote_ssa_mode (name, &unsignedp);
745403
+  if (reg_mode == BLKmode)
745403
+    return assign_temp (type, 0, 0);
745403
   rtx x = gen_reg_rtx (reg_mode);
745403
   if (POINTER_TYPE_P (type))
745403
     mark_reg_pointer (x, TYPE_ALIGN (TREE_TYPE (type)));