From 42a04c4841c19f5a93bb9c6e51108a6aa12eacb7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 17 Oct 2011 10:02:05 -0700 Subject: [PATCH] re PR tree-optimization/50746 (FAIL: gcc.dg/vect/pr37482.c (internal compiler error) on powerpc-apple-darwin9) PR 50746 * optabs.c (expand_vec_perm_expr): Fix indexing error. From-SVN: r180100 --- gcc/ChangeLog | 5 +++++ gcc/optabs.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6db875f0c4e..5524cb04683 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-10-17 Richard Henderson + + PR 50746 + * optabs.c (expand_vec_perm_expr): Fix indexing error. + 2011-10-17 Sergio Durigan Junior * configure.ac: Display `yes' if the SystemTap header has been diff --git a/gcc/optabs.c b/gcc/optabs.c index a373d7aeff4..332723e0665 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -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)); } -- 2.30.2