public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-99469-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            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 = 0;
  if (g())
    d = 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=cortex-a53
test.c: In function ‘f’:
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 const*))
        /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 <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2021-03-08 16:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 16:28 acoplan at gcc dot gnu.org [this message]
2021-03-08 19:19 ` [Bug rtl-optimization/99469] " acoplan at gcc dot gnu.org
2021-03-09 13:03 ` amonakov at gcc dot gnu.org
2021-03-31 14:14 ` acoplan at gcc dot gnu.org
2021-04-08 14:25 ` [Bug rtl-optimization/99469] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2021-04-09  8:29 ` rguenth at gcc dot gnu.org
2021-05-14  9:54 ` [Bug rtl-optimization/99469] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug rtl-optimization/99469] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug rtl-optimization/99469] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-11  2:50 ` law at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99469-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).