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