https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71702

--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
On 6/trunk, this issue is fixed or made latent by r230667 that added

+  STRIP_NOPS (t1);
+  STRIP_NOPS (t2);

to tree-vect-data-refs.c:compare_tree (patch submission here:
https://gcc.gnu.org/ml/gcc-patches/2015-11/msg02444.html ).
Should this change be backported to 4.9/5 now that an ICE is demonstrated?

On trunk, backing out that change and adding a qsort comparator checking to
vec.h causes ICEs in:

gcc.c-torture/execute/pr20527-1.c
gcc.dg/torture/pr52028.c
gcc.dg/torture/pr69174.c
gcc.dg/vect/fast-math-pr43074.c
gcc.dg/vect/pr60841.c
gcc.dg/vect/pr66677.c

(but seemingly no ICEs without that backout on check-c, so — no apparent issue
in other comparators). Thus, qsort comparator checking would uncover this issue
much earlier. Would the corresponding patch be welcome? (under CHECKING_P,
check in O(n^2) time that all pairs in the vector are properly ordered after
qsort, limiting n to 100 to avoid quadraticness hit)

Reply via email to