===================================================================
===================================================================
@@ -0,0 +1,19 @@
+! PR tree-optimization/46259
+! { dg-do compile }
+! { dg-options "-O3" }
+ SUBROUTINE RDSTFR(FRGMNT,IFRAG,PROVEC,FOCKMA,
+ * MXBF,MXMO,MXMO2,NTMOF)
+ PARAMETER (MXPT=100, MXFRG=50, MXFGPT=MXPT*MXFRG)
+ CHARACTER*8 WORD,MNAME,PNAME,RNAME
+ COMMON /FRGSTD/ CORD(3,MXPT),PCORD(3,MXPT),POLT(9,MXPT),
+ * INLPR(4*MXPT),IKFR(MXPT),IKLR(MXPT),
+ * MNAME(MXPT),PNAME(MXPT),RNAME(MXPT)
+ DO 10 I=1,MXPT
+ INLPR(4*(I-1)+1)=0
+ INLPR(4*(I-1)+2)=0
+ INLPR(4*(I-1)+3)=0
+ INLPR(4*(I-1)+4)=0
+ IKLR(I)=0
+ RNAME(I)=' '
+ 10 CONTINUE
+ END
===================================================================
@@ -987,7 +987,9 @@ vect_get_vec_def_for_operand (tree op, g
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
tree vec_inv;
tree vec_cst;
+ tree t = NULL_TREE;
tree def;
+ int i;
enum vect_def_type dt;
bool is_simple_use;
tree vector_type;
@@ -1049,7 +1051,13 @@ vect_get_vec_def_for_operand (tree op, g
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "Create vector_inv.");
- vec_inv = build_vector_from_val (vector_type, def);
+ for (i = nunits - 1; i >= 0; --i)
+ {
+ t = tree_cons (NULL_TREE, def, t);
+ }
+
+ /* FIXME: use build_constructor directly. */
+ vec_inv = build_constructor_from_list (vector_type, t);
return vect_init_vector (stmt, vec_inv, vector_type, NULL);
}