------- Comment #2 from ro at CeBiTec dot Uni-Bielefeld dot DE 2009-11-24 18:42 ------- Subject: Re: [4.5 regression] ICE building stage 1 libgcc on IRIX 5.3: SEGV in compare_access_positions
> ------- Comment #1 from jamborm at gcc dot gnu dot org 2009-11-24 18:16 > ------- > Can you please add a check before the qsort call (tree-sra.c, line > 1407) whether all pointers in the access_vec seem OK or whether it is > SRA that passes the invalid pointer to qsort? Nothing fancy, > something as stupid as the loop below should do: > > for (i =0; i < access_count; i++) > gcc_assert (((unsigned) VEC_index (access_p, access_vec, i)) > 0x1000); > > If it passes I can't see any other explanation but a bad qsort. If it > doesn't we'll need to figure out how the bad pointers get there. It seems that the qsort is broken (although I haven't found any report about qsort on IRIX 5.3 yet). Anyway, I've added a slightly modified qsort from glibc to libiberty (which won't work due to license differences, I suppose, but maybe newlib is an option), which allowed the bootstrap to continue. I'll later check (either with the code above or with gdb watchpoints) what is causing the corruption. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157