------- Comment #5 from dorit at gcc dot gnu dot org 2007-09-14 20:53 ------- (In reply to comment #4) > Very similar testcase with the difference that it is not fixed by r128415 and > makes current trunk segfault in VEC_tree_base_pop(): > void f (unsigned int *d, unsigned int *s, int w) > { > int i; > for (i = 0; i < w; ++i) > d [i] = s [i] * (unsigned short) (~d [i] >> 24); > }
this should fix it: Index: tree-vect-transform.c =================================================================== *** tree-vect-transform.c (revision 128501) --- tree-vect-transform.c (working copy) *************** vect_get_vec_defs_for_stmt_copy (enum ve *** 1938,1944 **** vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd); VEC_quick_push (tree, *vec_oprnds0, vec_oprnd); ! if (vec_oprnds1) { vec_oprnd = VEC_pop (tree, *vec_oprnds1); vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd); --- 1938,1944 ---- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd); VEC_quick_push (tree, *vec_oprnds0, vec_oprnd); ! if (vec_oprnds1 && *vec_oprnds1) { vec_oprnd = VEC_pop (tree, *vec_oprnds1); vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd); (and by the way, I think this is a totally different issue than what this PR was originally opened for, and should be a separate PR. I think this regression is due to r128289) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33373