public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2021-03-01 20:32 qinzhao at gcc dot gnu.org
  2021-04-21 15:01 ` [Bug rtl-optimization/99332] " acoplan at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2021-03-01 20:32 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-11  2:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 20:32 [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 qinzhao at gcc dot gnu.org
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

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).