Internal compiler error in egcs-1.1.1-prerelease3 on i686-pc-linux-gnu (glibc2)

Bernd Nottelmann nottelm@ptp283.uni-muenster.de
Fri Nov 27 10:20:00 GMT 1998


Hi,

I have tried to compile the actual teTeX-Package teTeX-src-0.9-981113.tar.gz
on a glibc-2.0.7pre6-System. In doing so the following error message has been
printed:

#gcc -O2 -c SPECIAL.c
caller-save.c:657: Internal compiler error in function insert_save_restore

Switching the optimization to levels less than -O2 lets vanish the error.
Here is the code:

/* ---------------------snip--------------------- */
inline double
floor (double __x)
{
  register double __value;
  __volatile unsigned short int __cw, __cwtmp;

  __asm __volatile ("fnstcw %0" : "=m" (__cw));
  __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
  __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
  __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
  __asm __volatile ("fldcw %0" : : "m" (__cw));

  return __value;
}

extern int XdrawLine(int, int, int, int);

#define TWOPI  (3.14159265359 * 2.0)

#define rint(x) floor((x) + 0.5)

static int  bbox_angle;

void draw_bbox()
{
 int xcorner, ycorner;
 float sin_a = bbox_angle * TWOPI;
 float cos_a = bbox_angle * TWOPI;
 float a, b, c, d;

 a = cos_a * bbox_angle;
 b = -sin_a * bbox_angle;
 c = -sin_a * bbox_angle;
 d = -cos_a * bbox_angle;

 XDrawLine(xcorner, ycorner,
    xcorner + (int) rint(a), ycorner + (int) rint(b));
 XDrawLine(xcorner + (int) rint(a), ycorner + (int) rint(b),
    xcorner + (int) rint(a + c), ycorner + (int) rint(b + d));
}
/* ---------------------snip--------------------- */

  Bernd





More information about the Gcc-bugs mailing list