public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033
@ 2020-12-02 17:15 gscfq@t-online.de
  2020-12-02 17:18 ` [Bug c++/98101] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2020-12-02 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98101
           Summary: ICE in mark_reachable_handlers, at tree-eh.c:4033
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5, only at -O0 :
(used options affect also several testsuite files)
(under the hood maybe related to pr59507/pr88640)


$ cat z1.cc
struct A { virtual ~A(); };
struct B { A a[1]; } b;


$ g++-11-20201129 -c z1.cc -fnon-call-exceptions -fvtable-verify=std -O2
$
$ g++-11-20201129 -c z1.cc -fnon-call-exceptions -fvtable-verify=std
during GIMPLE pass: ehcleanup
z1.cc: In destructor 'B::~B()':
z1.cc:2:8: internal compiler error: in mark_reachable_handlers, at
tree-eh.c:4033
    2 | struct B { A a[1]; } b;
      |        ^
0xcd644d mark_reachable_handlers
        ../../gcc/tree-eh.c:4033
0xcd6482 remove_unreachable_handlers
        ../../gcc/tree-eh.c:4080
0xcda601 execute_cleanup_eh_1
        ../../gcc/tree-eh.c:4783
0xcda601 execute
        ../../gcc/tree-eh.c:4850

---

z1.cc: In destructor 'B::~B()':
z1.cc:2:8: error: statement marked for throw in middle of block
    2 | struct B { A a[1]; } b;
      |        ^
# VUSE <.MEM_7>
_13 = _12->_vptr.A;
during GIMPLE pass: vtable-verify
z1.cc:2:8: internal compiler error: verify_gimple failed
0xfcaaf4 verify_gimple_in_cfg(function*, bool)
        ../../gcc/tree-cfg.c:5467
0xe867ee execute_function_todo
        ../../gcc/passes.c:2039
0xe87692 execute_todo
        ../../gcc/passes.c:2093

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

* [Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033
  2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
@ 2020-12-02 17:18 ` mpolacek at gcc dot gnu.org
  2020-12-03  7:20 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-12-02 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-12-02
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033
  2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
  2020-12-02 17:18 ` [Bug c++/98101] " mpolacek at gcc dot gnu.org
@ 2020-12-03  7:20 ` rguenth at gcc dot gnu.org
  2020-12-05  3:36 ` sss@li-snyder.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-03  7:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
VTV has it's issues and needs quite some TLC

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

* [Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033
  2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
  2020-12-02 17:18 ` [Bug c++/98101] " mpolacek at gcc dot gnu.org
  2020-12-03  7:20 ` rguenth at gcc dot gnu.org
@ 2020-12-05  3:36 ` sss@li-snyder.org
  2021-08-08 16:31 ` pinskia at gcc dot gnu.org
  2021-08-08 16:44 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: sss@li-snyder.org @ 2020-12-05  3:36 UTC (permalink / raw)
  To: gcc-bugs

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

scott snyder <sss@li-snyder.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sss@li-snyder.org

--- Comment #3 from scott snyder <sss@li-snyder.org> ---
Here's another example that crashes in the same place, but which doesn't use
-fvtable-verify.  This example does use vectorization, and the ICE occurs only
with -O3.  Seen with gcc  11.0.0 20201128.

-- x.cc ------------------------------------------------------------------
typedef double Packet2d __attribute__ ((__vector_size__ (16)));
Packet2d psub();

struct Translation
{
  double m_coeffs[2];
  Translation(double sx, double sy )
  {
    m_coeffs[0] = sx;
    m_coeffs[1] = sy;
  }
};

struct GeoTransform
{
  GeoTransform(const Translation& transform);
};

struct GeoIdentifierTag
{
  GeoIdentifierTag();
};

struct CryostatConstructionTBEC 
{
  virtual ~CryostatConstructionTBEC();
};


GeoTransform* createEnvelope()
{
  CryostatConstructionTBEC cryoConstruction;

  double pos[2];
  *(Packet2d*)pos = psub();

  new GeoIdentifierTag;
  return new GeoTransform( Translation(pos[0], pos[1])  );
}
---------------------------------------------------------------------------

$ g++ -c -O3 x.cc
during GIMPLE pass: ehcleanup
x.cc: In function ‘GeoTransform* createEnvelope()’:
x.cc:30:15: internal compiler error: in mark_reachable_handlers, at
tree-eh.c:4033
   30 | GeoTransform* createEnvelope()
      |               ^~~~~~~~~~~~~~
0x633a75 mark_reachable_handlers
        /home/sss/gcc/gcc/gcc/tree-eh.c:4033
0xcda146 remove_unreachable_handlers
        /home/sss/gcc/gcc/gcc/tree-eh.c:4080
0xcddfd1 execute_cleanup_eh_1
        /home/sss/gcc/gcc/gcc/tree-eh.c:4783
0xcddfd1 execute
        /home/sss/gcc/gcc/gcc/tree-eh.c:4850
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.

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

* [Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033
  2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-12-05  3:36 ` sss@li-snyder.org
@ 2021-08-08 16:31 ` pinskia at gcc dot gnu.org
  2021-08-08 16:44 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-08 16:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 59507.

*** This bug has been marked as a duplicate of bug 59507 ***

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

* [Bug c++/98101] ICE in mark_reachable_handlers, at tree-eh.c:4033
  2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-08-08 16:31 ` pinskia at gcc dot gnu.org
@ 2021-08-08 16:44 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-08 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to scott snyder from comment #3)
> Here's another example that crashes in the same place, but which doesn't use
> -fvtable-verify.  This example does use vectorization, and the ICE occurs
> only with -O3.  Seen with gcc  11.0.0 20201128.

This is a different bug and I can't reproduce it in a newer gcc 11.

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

end of thread, other threads:[~2021-08-08 16:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 17:15 [Bug c++/98101] New: ICE in mark_reachable_handlers, at tree-eh.c:4033 gscfq@t-online.de
2020-12-02 17:18 ` [Bug c++/98101] " mpolacek at gcc dot gnu.org
2020-12-03  7:20 ` rguenth at gcc dot gnu.org
2020-12-05  3:36 ` sss@li-snyder.org
2021-08-08 16:31 ` pinskia at gcc dot gnu.org
2021-08-08 16:44 ` pinskia 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).