On Thu, Oct 16, 2014 at 11:06:34AM -0600, Jeff Law wrote: > >>We really prefer fully specified sorts. For a qsort callback, this > >>doesn't look fully specified. > >> > >> > >>With that fixed, this should be OK. > >> > >>jeff > > > >Thanks for the review. Here is the updated version. > >Is it ok? > Yes, this is good for the trunk.
This broke bootstrap everywhere unfortunately, has it been tested at all? I already wrote during the initial comment that BLOCKs aren't decls and you can't push them into the vectors, they can't be sorted easily (BLOCK_NUMBER isn't assigned at that point e.g. and the comparison function looks at DECL_UID unconditionally anyway). I've bootstrapped/regtested on i686-linux the following quick fix, bootstrapped on x86_64-linux too, in the middle of regtesting there. If it succeeds, I'll commit as obvious, so that people can continue working on the trunk. 2014-10-21 Jakub Jelinek <ja...@redhat.com> * cilk.c (fill_decls_vec): Only put decls into vector v. (compare_decls): Fix up formatting. --- gcc/c-family/cilk.c.jj 2014-10-20 19:24:54.000000000 +0200 +++ gcc/c-family/cilk.c 2014-10-21 08:46:24.727790990 +0200 @@ -347,9 +347,12 @@ fill_decls_vec (tree const &key0, tree * tree t1 = key0; struct cilk_decls dp; - dp.key = t1; - dp.val = val0; - v->safe_push (dp); + if (DECL_P (t1)) + { + dp.key = t1; + dp.val = val0; + v->safe_push (dp); + } return true; } @@ -400,8 +403,8 @@ create_parm_list (struct wrapper_data *w static int compare_decls (const void *a, const void *b) { - const struct cilk_decls* t1 = (const struct cilk_decls*) a; - const struct cilk_decls* t2 = (const struct cilk_decls*) b; + const struct cilk_decls *t1 = (const struct cilk_decls *) a; + const struct cilk_decls *t2 = (const struct cilk_decls *) b; if (DECL_UID (t1->key) > DECL_UID (t2->key)) return 1; Jakub