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]

gcc-2.95.2pre unrolling bug: abort in haifa-sched.c


Hi,

the appended small testcase, distilled out of Mesa, abort on Linux/PPC if
compiled with -O3 -funroll-loops:

haifa-abort-O3-unroll.c: In function `test_transform_function':
haifa-abort-O3-unroll.c:48: Internal compiler error:
haifa-abort-O3-unroll.c:48: Internal compiler error in `schedule_region', at haifa-sched.c:7777

The mainline compiles this testcase fine. I backported quite a few of the
mainline patches, but the abort remained. Can it be that this is caused by the
temporary loopfix for 2.95? Maybe it's time to reconsider Joern's patch for
2.95.2?

Franz.


typedef int             GLint;
typedef unsigned char   GLubyte;
typedef unsigned int    GLuint;
typedef float           GLfloat;

extern int rand(void);

GLfloat rnd(void)
{
   GLfloat f = (GLfloat)rand() / (GLfloat)2147483647 ;
   GLfloat gran = (GLfloat)(1 << 13);

   f = (GLfloat)(GLint)(f * gran) / gran;

   return f * 2.0 - 1.0;
}



int test_transform_function(int psize)
{
   GLfloat s[100 ][5], d[100 ][4];
   GLubyte mask[100 ];
   int i, j;

  for (i = 0; i < 100 ; ++i) {
      mask[i] = i % 2;
      d[i][0] = s[i][0] = 0.0;
      d[i][1] = s[i][1] = 0.0;
      d[i][2] = s[i][2] = 0.0;
      d[i][3] = s[i][3] = 1.0;
      for (j = 0; j < psize; j++)
         s[i][j] = rnd();
   }
   return 1;
}


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