public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/107876] New: [13 Regression] ICE in verify_dominators, at dominance.cc:1184 (error: dominator of 4 should be 14, not 16)
Date: Sat, 26 Nov 2022 08:18:22 +0000	[thread overview]
Message-ID: <bug-107876-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107876
           Summary: [13 Regression] ICE in verify_dominators, at
                    dominance.cc:1184 (error: dominator of 4 should be 14,
                    not 16)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gfortran 13.0.0 20221120 snapshot (g:a16a5460447eaaff0b4468064e4d7b1cc8fc42eb)
ICEs when compiling the following testcase, extracted from
clang/testsuite/CodeGenCXX/nrvo.cpp from the clang 15 test suite, w/ -O2
-funswitch-loops --param max-unswitch-insns=2:

class X {
public:
  X();
  X(const X&);
  X(const volatile X &);
  ~X();
};

X test17(int i) {
  if (false) {
  impossible:
    if (i == 3)
      return X();
  }

  while (true) {
    X x;
    if (i == 0)
      return x;
    if (i == 1)
      break;
    if (i == 2)
      continue;
    if (i == 3)
      goto impossible;
    if (i == 4)
      __builtin_exit(1);
    if (i == 5)
      return x;
  }
  return X();
}

% g++-13 -O2 -funswitch-loops --param max-unswitch-insns=2 -c iakwvinl.cpp
iakwvinl.cpp: In function 'X test17(int)':
iakwvinl.cpp:9:3: error: dominator of 4 should be 14, not 16
    9 | X test17(int i) {
      |   ^~~~~~
iakwvinl.cpp:9:3: error: dominator of 6 should be 14, not 16
iakwvinl.cpp:9:3: error: dominator of 7 should be 14, not 16
iakwvinl.cpp:9:3: error: dominator of 8 should be 14, not 16
iakwvinl.cpp:9:3: error: dominator of 10 should be 14, not 16
iakwvinl.cpp:9:3: error: dominator of 11 should be 14, not 16
iakwvinl.cpp:9:3: error: dominator of 13 should be 14, not 16
during GIMPLE pass: unswitch
iakwvinl.cpp:9:3: internal compiler error: in verify_dominators, at
dominance.cc:1184
0x7a0ae6 verify_dominators(cdi_direction)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/dominance.cc:1184
0x121a869 checking_verify_dominators
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/dominance.h:76
0x121a869 cleanup_tree_cfg_noloop
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/tree-cfgcleanup.cc:1113
0x121a869 cleanup_tree_cfg(unsigned int)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/tree-cfgcleanup.cc:1212
0x10dddac execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/passes.cc:2057
0x10de20e execute_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/passes.cc:2145

             reply	other threads:[~2022-11-26  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26  8:18 asolokha at gmx dot com [this message]
2022-11-26 17:46 ` [Bug tree-optimization/107876] " pinskia at gcc dot gnu.org
2022-11-26 17:48 ` pinskia at gcc dot gnu.org
2022-11-28  6:48 ` [Bug tree-optimization/107876] [13 Regression] ICE in verify_dominators, at dominance.cc:1184 (error: dominator of 4 should be 14, not 16) since r13-3749-g7314b98b1bcd382c marxin at gcc dot gnu.org
2022-11-28  7:36 ` rguenth at gcc dot gnu.org
2022-11-28  8:13 ` rguenth at gcc dot gnu.org
2022-11-28  9:05 ` cvs-commit at gcc dot gnu.org
2022-11-28  9:05 ` rguenth at gcc dot gnu.org
2023-08-19  9:27 ` fxcoudert at gcc dot gnu.org
2023-09-01 21:43 ` egallager at gcc dot gnu.org
2023-09-12  7:12 ` rguenth 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-107876-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).