public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "qinzhao at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/99332] New: ICE:inreset_sched_cycles_in_current_ebb, at sel-sched.c:7147 with -fprofile-generate -O3 -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining
Date: Mon, 01 Mar 2021 20:32:32 +0000	[thread overview]
Message-ID: <bug-99332-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99332
           Summary: ICE:inreset_sched_cycles_in_current_ebb, at
                    sel-sched.c:7147 with -fprofile-generate -O3
                    -fselective-scheduling -fselective-scheduling2
                    -fsel-sched-pipelining
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qinzhao at gcc dot gnu.org
  Target Milestone: ---

This testing case is reduced from CPU2017 511.povray, it appears on aarch64
with both gcc11 and gcc10:

$ cat t.C
class OStream {
public:
  void printf(...);
};
typedef double VECTOR[3];
enum { X, Y, Z };
typedef struct ot_block_struct OT_BLOCK;
typedef int OT_NODE;
struct ot_block_struct {
  OT_BLOCK *next;
  VECTOR Point, S_Normal;
  VECTOR To_Nearest_Surface;
  short Bounce_Depth;
};
bool ot_write_block(OT_BLOCK *, void *);
bool ot_traverse(OT_NODE *, bool function(OT_BLOCK *, void *), void *handle) {
  bool oksofar;
  OT_BLOCK *this_block;
  while (this_block) {
    function(this_block, handle);
    this_block = this_block->next;
  }
  return oksofar;
}

bool ot_save_tree() {
  int *fd, *root;
  ot_traverse(root, ot_write_block, fd);
}

bool ot_write_block(OT_BLOCK *bl, void *fd) {
  ((OStream *)fd)->printf(
      bl[Z], bl->S_Normal[X] * int(bl->S_Normal[Z] * .5 * 254. + .499999),
      bl[Z], int(bl->To_Nearest_Surface[X]),
      int((bl->To_Nearest_Surface[Y] + 1.) * .5 * 254. + .499999),
      int((bl->To_Nearest_Surface[Z] + 1.) * .5 * 254. + .499999));
  return true;
}

[qzlocal@ca-dev-arm06 bug_2]$ sh t
/data1/qing/Install/latest/bin/g++ -fprofile-generate -O3
-fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -c -o t.o
t.C
t.C: In function 'bool ot_save_tree()':
t.C:29:1: warning: no return statement in function returning non-void
[-Wreturn-type]
   29 | }
      | ^
during RTL pass: sched2
t.C:29:1: internal compiler error: in reset_sched_cycles_in_current_ebb, at
sel-sched.c:7147
0x1063387 reset_sched_cycles_in_current_ebb
        ../../latest_gcc/gcc/sel-sched.c:7147
0x1063387 sel_region_target_finish
        ../../latest_gcc/gcc/sel-sched.c:7220
0x1063387 sel_region_finish
        ../../latest_gcc/gcc/sel-sched.c:7276
0x1063387 sel_sched_region(int)
        ../../latest_gcc/gcc/sel-sched.c:7645
0x1063593 run_selective_scheduling()
        ../../latest_gcc/gcc/sel-sched.c:7720
0x103e70b rest_of_handle_sched2
        ../../latest_gcc/gcc/sched-rgn.c:3738
0x103e70b execute
        ../../latest_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.

CPU2017 511.povray cannot be compiled on aarch64 due to this bug.

             reply	other threads:[~2021-03-01 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 20:32 qinzhao at gcc dot gnu.org [this message]
2021-04-21 15:01 ` [Bug rtl-optimization/99332] " acoplan at gcc dot gnu.org
2021-04-22 11:39 ` acoplan at gcc dot gnu.org
2021-07-06  6:44 ` [Bug rtl-optimization/99332] [11/12 Regression] " rguenth at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2022-01-17 15:01 ` [Bug rtl-optimization/99332] [11/12 Regression] ICE:in reset_sched_cycles_in_current_ebb, " rguenth at gcc dot gnu.org
2022-04-21  7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` [Bug rtl-optimization/99332] [11/12/13/14 " jakub at gcc dot gnu.org
2024-03-11  2:49 ` 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-99332-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).