This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges



------- Comment #7 from law at redhat dot com  2006-01-12 20:30 -------
Subject: Re:  [4.0 Regression] ICE in
        coalesce_abnormal_edges

On Thu, 2006-01-12 at 16:30 +0000, pinskia at gcc dot gnu dot org wrote:


Before PRE a$a_1 is live from the beginning of BB6 through the outgoing
edge into BB3, through BB3, including the outgoing edge from BB3 to BB7
where it dies in the PHI node at the start of BB7.

PRE inserts of use of a$a_1 in BB2, which extends the lifetime of a$a_1
to include BB1 and BB2.  Note that a$a_1 is used in an abnormal PHI
and is marked with SSA_NAME_OCCURS_IN_ABNORMAL_PHI, so PRE shouldn't be
messing with it in any way shape or form.

Anyway, a$a_1 now conflicts with a$a_52 which is live in BB1 and BB2
as well.  a$a_52 gets coalesced with a$a_5, but we're unable to then
coalesce a$a_1 into that set because of the conflict.

You should assign this bug to Daniel since he's the PRE expert.


struct C
{
  int a;
  int *b;
  int *c1 (int x) { return new int[sizeof (int) * x]; }
  C (int x = 0) : a (x) 
  {
        b = c1 (a);
  }
  C (const C & x) : a (x.a) 
  {
        b = c1 (a);
  }
  ~C (void) { if (a) delete b; }
  int &operator [] (int x)
  {
    if (x == 0)
      {
        a = 1;
        b = c1 (1);
      }
    else
        C e (*this);
    return b[x];
  }
  C & operator << (int x) { (*this)[a] = x; return *this; }
};

int
bar (void)
{
  C a;
  int f = 1;
  while (f != -1)
      a << 1;
}


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]