re PR tree-optimization/50746 (FAIL: gcc.dg/vect/pr37482.c (internal compiler error...
authorRichard Henderson <rth@redhat.com>
Mon, 17 Oct 2011 17:02:05 +0000 (10:02 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 17 Oct 2011 17:02:05 +0000 (10:02 -0700)
PR 50746
        * optabs.c (expand_vec_perm_expr): Fix indexing error.

From-SVN: r180100

gcc/ChangeLog
gcc/optabs.c

index 6db875f..5524cb0 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-17  Richard Henderson  <rth@redhat.com>
+
+       PR 50746
+       * optabs.c (expand_vec_perm_expr): Fix indexing error.
+
 2011-10-17  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * configure.ac: Display `yes' if the SystemTap header has been
index a373d7a..332723e 100644 (file)
@@ -6837,7 +6837,7 @@ expand_vec_perm_expr (tree type, tree v0, tree v1, tree sel, rtx target)
           this_e *= u;
 
          for (j = 0; j < u; ++j)
-           vec[i * e + j] = GEN_INT (this_e + j);
+           vec[i * u + j] = GEN_INT (this_e + j);
        }
       sel_rtx = gen_rtx_CONST_VECTOR (qimode, gen_rtvec_v (w, vec));
     }