public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25857]  New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621
@ 2006-01-19 11:27 wouter dot vermaelen at pi dot be
  2006-01-19 12:30 ` [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2 pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: wouter dot vermaelen at pi dot be @ 2006-01-19 11:27 UTC (permalink / raw)
  To: gcc-bugs

-- foo.cc -----------------------------
#include <string>
struct Foo { void f(); };
struct Bar { Foo& getFoo(); };
struct Qux {
        ~Qux();
        Bar bar;
        std::string s1, s2, s3, s4;
};
Qux::~Qux() { bar.getFoo().f(); }
---------------------------------------

> g++ -O2 foo.cc
foo.cc: In destructor 'Qux::~Qux()':
foo.cc:9: internal compiler error: in coalesce_abnormal_edges, at
tree-outof-ssa.c:621

Only happens with -O2 or -O3. I tested with SVN version of 2006/01/18.


-- 
           Summary: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter dot vermaelen at pi dot be


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
@ 2006-01-19 12:30 ` pinskia at gcc dot gnu dot org
  2006-01-19 14:10 ` reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-19 12:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-19 12:30 -------
I can confirm it but I am not reducing this currently.  From the looks of it,
it looks to be another issue with the mergephi.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|c++                         |tree-optimization
           Keywords|                            |ice-on-valid-code
            Summary|ICE in                      |[4.2 Regression] ICE in
                   |coalesce_abnormal_edges, at |coalesce_abnormal_edges at -
                   |tree-outof-ssa.c:621        |O2
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
  2006-01-19 12:30 ` [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2 pinskia at gcc dot gnu dot org
@ 2006-01-19 14:10 ` reichelt at gcc dot gnu dot org
  2006-01-21  1:48 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-01-19 14:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2006-01-19 14:10 -------
Confirmed. Reduced testcase:

===========================================
int foo();
int i;

struct A
{
  ~A() { if (this != (A*)(&i)) foo(); }
};

struct B
{
  A a1, a2, a3, a4;
  ~B() { foo(); }
};

B b;
===========================================


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |monitored
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-19 14:10:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
  2006-01-19 12:30 ` [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2 pinskia at gcc dot gnu dot org
  2006-01-19 14:10 ` reichelt at gcc dot gnu dot org
@ 2006-01-21  1:48 ` pinskia at gcc dot gnu dot org
  2006-01-21  2:00 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-21  1:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-01-21 01:48 -------
Patch which I am going to test:
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c      (revision 110030)
+++ tree-ssa-pre.c      (working copy)
@@ -2741,10 +2741,13 @@ insert_extra_phis (basic_block block, ba
       edge e;
       edge_iterator ei;
       bool first = true;
+      bool in_ab = false;
       bitmap_set_t tempset = bitmap_set_new ();

       FOR_EACH_EDGE (e, ei, block->preds)
        {
+         if ((e->flags & EDGE_ABNORMAL) != 0)
+           in_ab = true;
          if (first)
            {
              bitmap_set_copy (tempset, AVAIL_OUT (e->src));
@@ -2768,7 +2771,7 @@ insert_extra_phis (basic_block block, ba
              tree val = get_value_handle (name);
              tree temp;

-             if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
+             if (in_ab)
                continue;

              if (!mergephitemp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
                   ` (2 preceding siblings ...)
  2006-01-21  1:48 ` pinskia at gcc dot gnu dot org
@ 2006-01-21  2:00 ` pinskia at gcc dot gnu dot org
  2006-01-21  5:19 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-21  2:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-01-21 02:00 -------
I have an even simplier patch which I got from Daniel Berlin  instead of "in_ab
= true;" just doing a return will fix this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
                   ` (3 preceding siblings ...)
  2006-01-21  2:00 ` pinskia at gcc dot gnu dot org
@ 2006-01-21  5:19 ` pinskia at gcc dot gnu dot org
  2006-01-23 15:19 ` pinskia at gcc dot gnu dot org
  2006-01-23 15:20 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-21  5:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-01-21 05:19 -------
Mine.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
                   ` (4 preceding siblings ...)
  2006-01-21  5:19 ` pinskia at gcc dot gnu dot org
@ 2006-01-23 15:19 ` pinskia at gcc dot gnu dot org
  2006-01-23 15:20 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-23 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-01-23 15:19 -------
Subject: Bug 25857

Author: pinskia
Date: Mon Jan 23 15:19:29 2006
New Revision: 110127

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110127
Log:
2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
            Daniel Berlin  <dberlin@dberlin.org>

        PR tree-opt/25315
        PR tree-opt/25857
        * tree-ssa-pre.c (insert_extra_phis): If an incomming edge is abnormal
        return from the function.

2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/25857
        * g++.dg/opt/pr25857.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/opt/pr25857.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-pre.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

* [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2
  2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
                   ` (5 preceding siblings ...)
  2006-01-23 15:19 ` pinskia at gcc dot gnu dot org
@ 2006-01-23 15:20 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-23 15:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-01-23 15:19 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25857


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

end of thread, other threads:[~2006-01-23 15:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-19 11:27 [Bug c++/25857] New: ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:621 wouter dot vermaelen at pi dot be
2006-01-19 12:30 ` [Bug tree-optimization/25857] [4.2 Regression] ICE in coalesce_abnormal_edges at -O2 pinskia at gcc dot gnu dot org
2006-01-19 14:10 ` reichelt at gcc dot gnu dot org
2006-01-21  1:48 ` pinskia at gcc dot gnu dot org
2006-01-21  2:00 ` pinskia at gcc dot gnu dot org
2006-01-21  5:19 ` pinskia at gcc dot gnu dot org
2006-01-23 15:19 ` pinskia at gcc dot gnu dot org
2006-01-23 15:20 ` pinskia at gcc dot gnu dot 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).