[Bug tree-optimization/26909] [4.2 Regression] ICE compiling GLIB with gcc 4.2-20060325

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 30 13:02:00 GMT 2006



------- Comment #3 from reichelt at gcc dot gnu dot org  2006-03-30 13:02 -------
Reduced testcase (fails with "-O2 -m32" on x86_64-unknown-linux-gnu):

=======================================================================
typedef struct { int i; } A;
typedef struct { int i; } B;

int M;

void foo(A* p)
{
  B *q;
  int i, j, N;

  if (M) bar();
  if (p->i > 0) j = 1; else j = 0;
  q = __builtin_expect (__extension__ ({ j; }), 1) ? (B*)p : (B*)0;
  N = p->i;
  bar();

  for (i = 0; i < N; i++)
    q[i].i=0;

  bar();
}
=======================================================================


-- 

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-03-30 13:02:40
               date|                            |


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



More information about the Gcc-bugs mailing list