From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D8411385041C; Mon, 8 Mar 2021 16:28:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8411385041C From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99469] New: ICE: qsort checking failed with selective scheduling on aarch64 Date: Mon, 08 Mar 2021 16:28:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 16:28:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99469 Bug ID: 99469 Summary: ICE: qsort checking failed with selective scheduling on aarch64 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following fails: $ cat test.c typedef struct { int a[3]; } s; s ss[1][5][8]; int g(); void h(s); int foo(char *, ...); void f() { int a, b, c, d =3D 0; if (g()) d =3D 1; for (; a; a++) { if (d) foo("a", ""); h(ss[a][b][c]); if (d) foo("a"); } } $ aarch64-linux-gnu-gcc -c test.c -O2 -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -mtune=3Dcortex-a53 test.c: In function =E2=80=98f=E2=80=99: test.c:21:1: error: qsort comparator not anti-symmetric: -1, -1 21 | } | ^ during RTL pass: sched2 test.c:21:1: internal compiler error: qsort checking failed 0x1c2b727 qsort_chk_error /home/alecop01/toolchain/src/gcc/gcc/vec.c:214 0x1c2bc7d qsort_chk(void*, unsigned long, unsigned long, int (*)(void const= *, void const*, void*), void*) /home/alecop01/toolchain/src/gcc/gcc/vec.c:258 0x1c62d8e gcc_qsort(void*, unsigned long, unsigned long, int (*)(void const= *, void const*)) /home/alecop01/toolchain/src/gcc/gcc/sort.cc:270 0xda2728 vec<_expr*, va_heap, vl_embed>::qsort(int (*)(void const*, void const*)) /home/alecop01/toolchain/src/gcc/gcc/vec.h:1148 0xda2728 vec<_expr*, va_heap, vl_ptr>::qsort(int (*)(void const*, void cons= t*)) /home/alecop01/toolchain/src/gcc/gcc/vec.h:2041 0xda2728 fill_vec_av_set /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:3717 0xda65d2 fill_ready_list /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:4014 0xda65d2 find_best_expr /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:4374 0xda65d2 fill_insns /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:5535 0xda65d2 schedule_on_fences /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:7353 0xda65d2 sel_sched_region_2 /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:7491 0xda9508 sel_sched_region_1 /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:7533 0xda9e2f sel_sched_region(int) /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:7634 0xdab3cf run_selective_scheduling() /home/alecop01/toolchain/src/gcc/gcc/sel-sched.c:7720 0xd85b1c rest_of_handle_sched2 /home/alecop01/toolchain/src/gcc/gcc/sched-rgn.c:3738 0xd85b1c execute /home/alecop01/toolchain/src/gcc/gcc/sched-rgn.c:3882 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=