public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108792] New: [10/11/12/13 Regression] ICE in reset_sched_cycles_in_current_ebb, at sel-sched.cc:7147
Date: Tue, 14 Feb 2023 19:35:32 +0000	[thread overview]
Message-ID: <bug-108792-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 108792
           Summary: [10/11/12/13 Regression] ICE in
                    reset_sched_cycles_in_current_ebb, at
                    sel-sched.cc:7147
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started with r10 between 20191110 and 20191117 (one week before pr97972),
at -O2+ and with special option -march=amdfam10 :

Testcase was derived from
llvm-project-llvmorg-14.0.6/openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers_complex_structure.cpp


$ cat z1.cc
class A {
public:
  A() {
    a = 1;
    b = 2;
  }
  void show() {
    __builtin_printf ("\n");
    __builtin_printf ("%d %d\n", a, b);
  }
  int a;
  int b;
};
class B {
public:
  B() {
    arr = new A[2];
    len = 2;
  }
  void show() {
    for (int i = 0; i < len; i++)
      arr[i].show();
  }
  A *arr;
  int len;
};
void foo (void) {
  B *x = new B[2];
  for (int i = 0; i < 2; i++)
    x[i].show();
  return;
}


$ gcc-13-20230212 -c z1.cc -O2 -fnon-call-exceptions -fprofile-generate
-fsel-sched-pipelining -fselective-scheduling2
$
$ gcc-13-20230212 -c z1.cc -O2 -fnon-call-exceptions -fprofile-generate
-fsel-sched-pipelining -fselective-scheduling2 -march=amdfam10
during RTL pass: sched2
z1.cc: In member function 'void B::show()':
z1.cc:23:3: internal compiler error: in reset_sched_cycles_in_current_ebb, at
sel-sched.cc:7147
   23 |   }
      |   ^
0x11f60c5 reset_sched_cycles_in_current_ebb
        ../../gcc/sel-sched.cc:7147
0x11f60c5 sel_region_target_finish
        ../../gcc/sel-sched.cc:7220
0x11f60c5 sel_region_finish
        ../../gcc/sel-sched.cc:7276
0x11f60c5 sel_sched_region(int)
        ../../gcc/sel-sched.cc:7645
0x11f62f9 run_selective_scheduling()
        ../../gcc/sel-sched.cc:7720
0x11d2475 rest_of_handle_sched2
        ../../gcc/sched-rgn.cc:3743
0x11d2475 execute
        ../../gcc/sched-rgn.cc:3890

             reply	other threads:[~2023-02-14 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 19:35 gscfq@t-online.de [this message]
2023-02-15  8:38 ` [Bug rtl-optimization/108792] " rguenth at gcc dot gnu.org
2023-02-23 14:52 ` marxin at gcc dot gnu.org
2023-03-27 11:02 ` rguenth at gcc dot gnu.org
2023-07-07 10:44 ` [Bug rtl-optimization/108792] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-07 14:51 ` 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-108792-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).