Bug 83631 - ICE: qsort checking failed: qsort comparator non-negative on sorted output: 7 with -fno-sched-rank-heuristic --param=max-sched-extend-regions-iters=4
Summary: ICE: qsort checking failed: qsort comparator non-negative on sorted output: 7...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 8.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2017-12-30 18:23 UTC by Zdenek Sojka
Modified: 2021-09-20 10:45 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: powerpc-unknown-linux-gnu
Build: x86_64-pc-linux-gnu
Known to work:
Known to fail: 8.0
Last reconfirmed:


Attachments
reduced testcase (119 bytes, text/plain)
2017-12-30 18:23 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2017-12-30 18:23:27 UTC
Created attachment 42990 [details]
reduced testcase

Compiler output:
$ powerpc-unknown-linux-gnu-gcc -O2 -fno-sched-rank-heuristic --param=max-sched-extend-regions-iters=4 testcase.c 
testcase.c: In function 'foo':
testcase.c:10:1: error: qsort comparator non-negative on sorted output: 7
 }
 ^
during RTL pass: sched1
testcase.c:10:1: internal compiler error: qsort checking failed
0x5c039d qsort_chk_error
        /repo/gcc-trunk/gcc/vec.c:222
0x150321a qsort_chk(void*, unsigned long, unsigned long, int (*)(void const*, void const*))
        /repo/gcc-trunk/gcc/vec.c:274
0x1409dc8 ready_sort_real
        /repo/gcc-trunk/gcc/haifa-sched.c:3087
0x1412b38 schedule_block(basic_block_def**, void*)
        /repo/gcc-trunk/gcc/haifa-sched.c:6675
0xbd387a schedule_region
        /repo/gcc-trunk/gcc/sched-rgn.c:3174
0xbd387a schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.c:3513
0xbd3ca3 schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.c:3498
0xbd3ca3 rest_of_handle_sched
        /repo/gcc-trunk/gcc/sched-rgn.c:3717
0xbd3ca3 execute
        /repo/gcc-trunk/gcc/sched-rgn.c:3825
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

$ powerpc-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-powerpc/bin/powerpc-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-256045-checking-yes-rtl-df-extra-nobootstrap-nographite-powerpc/bin/../libexec/gcc/powerpc-unknown-linux-gnu/8.0.0/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --without-cloog --without-ppl --without-isl --with-sysroot=/usr/powerpc-unknown-linux-gnu --target=powerpc-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=powerpc-unknown-linux-gnu --with-ld=/usr/bin/powerpc-unknown-linux-gnu-ld --with-as=/usr/bin/powerpc-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-256045-checking-yes-rtl-df-extra-nobootstrap-nographite-powerpc
Thread model: posix
gcc version 8.0.0 20171230 (experimental) (GCC)
Comment 1 Arseny Solokha 2018-09-10 05:29:54 UTC
I cannot reproduce it for powerpc-e300c3-linux-gnu w/ gcc-9.0.0-alpha20180909 snapshot (r264185).
Comment 2 Zdenek Sojka 2018-09-10 05:46:26 UTC
I can't reproduce it anymore as well.
Comment 3 Andrew Pinski 2021-09-20 10:41:29 UTC
This was fixed by r8-6634.