public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101162] New: [12 Regression] ICE (verify_gimple failed) for switch returning pointer-to-members
@ 2021-06-22  8:40 reichelt at gcc dot gnu.org
  2021-06-22  8:45 ` [Bug c++/101162] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2021-06-22  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101162
           Summary: [12 Regression] ICE (verify_gimple failed) for switch
                    returning pointer-to-members
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid testcase triggers an ICE on trunk when compiled with "-O2":

===================================
struct A
{
  int i1, i2, i3, i4, i5, i6;
};

int A::* foo(int i)
{
  switch (i)
  {
    case 1: return &A::i1;
    case 2: return &A::i2;
    case 3: return &A::i3;
    case 4: return &A::i4;
    case 5: return &A::i5;
    case 6: return &A::i6;
  }

  return 0;
}
===================================

bug.cc: In function 'int A::* foo(int)':
bug.cc:19:1: error: invalid types for 'mult_expr'
   19 | }
      | ^
<<< Unknown tree: offset_type >>>
<<< Unknown tree: offset_type >>>
<<< Unknown tree: offset_type >>>
_7 = 4 * _6;
during GIMPLE pass: switchconv
bug.cc:19:1: internal compiler error: verify_gimple failed
0x11025aa verify_gimple_in_cfg(function*, bool)
        ../../gcc/gcc/tree-cfg.c:5531
0xfe1587 execute_function_todo
        ../../gcc/gcc/passes.c:2042
0xfe1fab execute_todo
        ../../gcc/gcc/passes.c:2096
Please submit a full bug report, [etc.]

This regression was introduced between 2021-06-14 and 2021-06-21.

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

end of thread, other threads:[~2021-07-18 10:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22  8:40 [Bug c++/101162] New: [12 Regression] ICE (verify_gimple failed) for switch returning pointer-to-members reichelt at gcc dot gnu.org
2021-06-22  8:45 ` [Bug c++/101162] " pinskia at gcc dot gnu.org
2021-06-22  8:47 ` [Bug tree-optimization/101162] " pinskia at gcc dot gnu.org
2021-06-22  9:07 ` jakub at gcc dot gnu.org
2021-06-22  9:11 ` [Bug tree-optimization/101162] [12 Regression] ICE (verify_gimple failed) for switch returning pointer-to-members since r12-1608 pinskia at gcc dot gnu.org
2021-06-22  9:12 ` jakub at gcc dot gnu.org
2021-06-22 12:30 ` marxin at gcc dot gnu.org
2021-06-22 13:23 ` cvs-commit at gcc dot gnu.org
2021-07-18 10:41 ` jakub 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).