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

            Bug ID: 84068
           Summary: ICE: qsort checking failed: qsort comparator
                    non-negative on sorted output: 1 with
                    -fno-sched-critical-path-heuristic
                    --param=max-sched-extend-regions-iters=5 @ aarch64
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: aarch64-unknown-linux-gnu

Created attachment 43258
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43258&action=edit
reduced testcase

Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O2 -fno-sched-critical-path-heuristic
-fno-sched-rank-heuristic --param=max-sched-extend-regions-iters=5 testcase.c 
testcase.c: In function 'foo':
testcase.c:7:1: error: qsort comparator non-negative on sorted output: 1
 }
 ^
during RTL pass: sched1
testcase.c:7:1: internal compiler error: qsort checking failed
0x5ec995 qsort_chk_error
        /repo/gcc-trunk/gcc/vec.c:201
0x156d5ca qsort_chk(void*, unsigned long, unsigned long, int (*)(void const*,
void const*))
        /repo/gcc-trunk/gcc/vec.c:253
0x146c640 ready_sort_real
        /repo/gcc-trunk/gcc/haifa-sched.c:3087
0x14756ca schedule_block(basic_block_def**, void*)
        /repo/gcc-trunk/gcc/haifa-sched.c:6675
0xc1b7da schedule_region
        /repo/gcc-trunk/gcc/sched-rgn.c:3174
0xc1b7da schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.c:3513
0xc1bc03 schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.c:3498
0xc1bc03 rest_of_handle_sched
        /repo/gcc-trunk/gcc/sched-rgn.c:3717
0xc1bc03 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.
See <https://gcc.gnu.org/bugs/> for instructions.

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-257087-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/8.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-257087-checking-yes-rtl-df-extra-aarch64
Thread model: posix
gcc version 8.0.1 20180126 (experimental) (GCC)

Reply via email to