egcs-2.93.22 19990517 Internal compiler error
Marco S Hyman
marc@snafu.org
Wed Jun 2 12:15:00 GMT 1999
SYSTEM:
OpenBSD mc.snafu.org 2.5 MC#64 i386
COMMAND LINE:
cc -v -save-temps -O6 -DHAVE_CONFIG_H -I. -c gdith.c
CONSOLE OUTPUT:
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd2.5/egcs-2.93.22/specs
gcc version egcs-2.93.22 19990517 (gcc2 ss-980929 experimental)
/usr/lib/gcc-lib/i386-unknown-openbsd2.5/egcs-2.93.22/cpp -lang-c -v -I. -D__GNUC__=2 -D__GNUC_MINOR__=93 -D__unix__ -D__i386__ -D__OpenBSD__ -D__unix__ -D__i386__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ -DHAVE_CONFIG_H gdith.c gdith.i
GNU CPP version egcs-2.93.22 19990517 (gcc2 ss-980929 experimental) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
.
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/include/g++
End of omitted list.
/usr/lib/gcc-lib/i386-unknown-openbsd2.5/egcs-2.93.22/cc1 gdith.i -quiet -dumpbase gdith.c -O6 -version -o gdith.s
GNU C version egcs-2.93.22 19990517 (gcc2 ss-980929 experimental) (i386-unknown-openbsd2.5) compiled by GNU C version egcs-2.93.22 19990517 (gcc2 ss-980929 experimental).
gdith.c: In function `InitColormap':
gdith.c:171: Internal compiler error in `print_operand', at config/i386/i386.c:3405
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
PRE-PROCESSED INPUT
# 1 "gdith.c"
# 1 "config.h" 1
# 23 "gdith.c" 2
# 1 "dither.h" 1
extern int LUM_RANGE;
extern int CR_RANGE;
extern int CB_RANGE;
extern unsigned char pixel[256];
extern int *lum_values;
extern int *cr_values;
extern int *cb_values;
# 24 "gdith.c" 2
# 1 "globals.h" 1
# 1 "/usr/include/stdio.h" 1 3
# 1 "/usr/include/sys/types.h" 1 3
# 1 "/usr/include/machine/types.h" 1 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 1 "/usr/include/machine/cdefs.h" 1 3
# 53 "/usr/include/sys/cdefs.h" 2 3
# 110 "/usr/include/sys/cdefs.h" 3
# 42 "/usr/include/machine/types.h" 2 3
typedef struct _physadr {
int r[1];
} *physadr;
typedef struct label_t {
int val[6];
} label_t;
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
typedef signed char int8_t;
typedef unsigned char u_int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long u_int64_t;
typedef unsigned long long uint64_t;
typedef int32_t register_t;
# 48 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/machine/ansi.h" 1 3
# 50 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/machine/endian.h" 1 3
# 1 "/usr/include/sys/endian.h" 1 3
# 83 "/usr/include/sys/endian.h" 3
u_int32_t htobe32 (u_int32_t) ;
u_int16_t htobe16 (u_int16_t) ;
u_int32_t betoh32 (u_int32_t) ;
u_int16_t betoh16 (u_int16_t) ;
u_int32_t htole32 (u_int32_t) ;
u_int16_t htole16 (u_int16_t) ;
u_int32_t letoh32 (u_int32_t) ;
u_int16_t letoh16 (u_int16_t) ;
# 169 "/usr/include/sys/endian.h" 3
# 68 "/usr/include/machine/endian.h" 2 3
# 51 "/usr/include/sys/types.h" 2 3
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef u_int64_t u_quad_t;
typedef int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t;
typedef int32_t daddr_t;
typedef int32_t dev_t;
typedef u_int32_t fixpt_t;
typedef u_int32_t gid_t;
typedef u_int32_t ino_t;
typedef long key_t;
typedef u_int16_t mode_t;
typedef u_int16_t nlink_t;
typedef quad_t off_t;
typedef int32_t pid_t;
typedef quad_t rlim_t;
typedef int32_t segsz_t;
typedef int32_t swblk_t;
typedef u_int32_t uid_t;
typedef u_int32_t useconds_t;
typedef int32_t suseconds_t;
typedef u_int32_t in_addr_t;
typedef u_int16_t in_port_t;
typedef u_int8_t sa_family_t;
typedef u_int32_t socklen_t;
off_t lseek (int, off_t, int) ;
int ftruncate (int, off_t) ;
int truncate (const char *, off_t) ;
typedef unsigned long clock_t;
typedef unsigned int size_t;
typedef int ssize_t;
typedef int time_t;
typedef int clockid_t;
typedef int timer_t;
typedef int32_t fd_mask;
typedef struct fd_set {
fd_mask fds_bits[((( 256 ) + (( (sizeof(fd_mask) * 8 ) ) - 1)) / ( (sizeof(fd_mask) * 8 ) )) ];
} fd_set;
# 201 "/usr/include/sys/types.h" 3
# 46 "/usr/include/stdio.h" 2 3
typedef off_t fpos_t;
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
void *_cookie;
int (*_close) (void *) ;
int (*_read) (void *, char *, int) ;
fpos_t (*_seek) (void *, fpos_t, int) ;
int (*_write) (void *, const char *, int) ;
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
fpos_t _offset;
} FILE;
extern FILE __sF[];
void clearerr (FILE *) ;
int fclose (FILE *) ;
int feof (FILE *) ;
int ferror (FILE *) ;
int fflush (FILE *) ;
int fgetc (FILE *) ;
int fgetpos (FILE *, fpos_t *) ;
char *fgets (char *, int, FILE *) ;
FILE *fopen (const char *, const char *) ;
int fprintf (FILE *, const char *, ...) ;
int fputc (int, FILE *) ;
int fputs (const char *, FILE *) ;
size_t fread (void *, size_t, size_t, FILE *) ;
FILE *freopen (const char *, const char *, FILE *) ;
int fscanf (FILE *, const char *, ...) ;
int fseek (FILE *, long, int) ;
int fsetpos (FILE *, const fpos_t *) ;
long ftell (FILE *) ;
size_t fwrite (const void *, size_t, size_t, FILE *) ;
int getc (FILE *) ;
int getchar (void) ;
char *gets (char *) ;
extern int sys_nerr;
extern char *sys_errlist[];
void perror (const char *) ;
int printf (const char *, ...) ;
int putc (int, FILE *) ;
int putchar (int) ;
int puts (const char *) ;
int remove (const char *) ;
int rename (const char *, const char *) ;
void rewind (FILE *) ;
int scanf (const char *, ...) ;
void setbuf (FILE *, char *) ;
int setvbuf (FILE *, char *, int, size_t) ;
int sprintf (char *, const char *, ...) ;
int sscanf (const char *, const char *, ...) ;
FILE *tmpfile (void) ;
char *tmpnam (char *) ;
int ungetc (int, FILE *) ;
int vfprintf (FILE *, const char *, char * ) ;
int vprintf (const char *, char * ) ;
int vsprintf (char *, const char *, char * ) ;
char *ctermid (char *) ;
char *ctermid_r (char *) ;
char *cuserid (char *) ;
FILE *fdopen (int, const char *) ;
int fileno (FILE *) ;
void flockfile (FILE *) ;
int ftrylockfile (FILE *) ;
void funlockfile (FILE *) ;
void _flockfile_debug (FILE *, const char *, int) ;
int getc_unlocked (FILE *) ;
int putc_unlocked (int, FILE *) ;
int getchar_unlocked (void) ;
int putchar_unlocked (int) ;
int asprintf (char **, const char *, ...)
__attribute__((format (printf, 2, 3)));
char *fgetln (FILE *, size_t *) ;
int fpurge (FILE *) ;
int getw (FILE *) ;
int pclose (FILE *) ;
FILE *popen (const char *, const char *) ;
int putw (int, FILE *) ;
void setbuffer (FILE *, char *, int) ;
int setlinebuf (FILE *) ;
char *tempnam (const char *, const char *) ;
int snprintf (char *, size_t, const char *, ...)
__attribute__((format (printf, 3, 4)));
int vasprintf (char **, const char *, char * )
__attribute__((format (printf, 2, 0)));
int vsnprintf (char *, size_t, const char *, char * )
__attribute__((format (printf, 3, 0)));
int vscanf (const char *, char * )
__attribute__((format (scanf, 1, 0)));
int vsscanf (const char *, const char *, char * )
__attribute__((format (scanf, 2, 0)));
FILE *funopen (const void *,
int (*)(void *, char *, int),
int (*)(void *, const char *, int),
fpos_t (*)(void *, fpos_t, int),
int (*)(void *)) ;
int __srget (FILE *) ;
int __svfscanf (FILE *, const char *, char * ) ;
int __swbuf (int, FILE *) ;
static __inline int __sputc(int _c, FILE *_p) {
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else
return (__swbuf(_c, _p));
}
# 383 "/usr/include/stdio.h" 3
# 22 "globals.h" 2
# 1 "mpeg.h" 1
typedef unsigned int Boolean;
typedef struct
{
short red, green, blue;
} ColormapEntry;
typedef struct
{
int Height;
int Width;
int Depth;
int PixelSize;
int Size;
int BitmapPad;
int PictureRate;
int BitRate;
int ColormapSize;
ColormapEntry *Colormap;
} ImageDesc;
typedef enum
{
HYBRID_DITHER,
HYBRID2_DITHER,
FS4_DITHER,
FS2_DITHER,
FS2FAST_DITHER,
Twox2_DITHER,
GRAY_DITHER,
FULL_COLOR_DITHER,
NO_DITHER,
ORDERED_DITHER,
MONO_DITHER,
MONO_THRESHOLD,
ORDERED2_DITHER,
MBORDERED_DITHER
} DitherEnum;
typedef enum
{
MPEG_DITHER,
MPEG_QUIET,
MPEG_LUM_RANGE,
MPEG_CR_RANGE,
MPEG_CB_RANGE,
MPEG_CMAP_INDEX
} MPEGOptionEnum;
Boolean OpenMPEG (FILE *MPEGfile, ImageDesc *ImgInfo) ;
void CloseMPEG (void) ;
Boolean RewindMPEG (FILE *MPEGfile, ImageDesc *Image) ;
void SetMPEGOption (MPEGOptionEnum Option, int value) ;
Boolean GetMPEGFrame (char *Frame) ;
# 23 "globals.h" 2
extern DitherEnum ditherType;
extern FILE *input;
extern Boolean EOF_flag;
extern unsigned int curBits;
extern int bitOffset, bufLength;
extern unsigned int *bitBuffer;
# 25 "gdith.c" 2
int LUM_RANGE = 8;
int CR_RANGE = 4;
int CB_RANGE = 4;
unsigned char pixel[256];
int *lum_values;
int *cr_values;
int *cb_values;
static void
InitColor()
{
int i;
for (i=0; i<LUM_RANGE; i++) {
lum_values[i] = ((i * 256) / (LUM_RANGE)) + (256/(LUM_RANGE*2));
}
for (i=0; i<CR_RANGE; i++) {
cr_values[i] = ((i * 256) / (CR_RANGE)) + (256/(CR_RANGE*2));
}
for (i=0; i<CB_RANGE; i++) {
cb_values[i] = ((i * 256) / (CB_RANGE)) + (256/(CB_RANGE*2));
}
}
static void
ConvertColor(l, cr, cb, r, g, b)
unsigned char l, cr, cb;
unsigned char *r, *g, *b;
{
double fl, fcr, fcb, fr, fg, fb;
fl = (double) l;
fcr = ((double) cr) - 128.0;
fcb = ((double) cb) - 128.0;
fr = fl + (1.40200 * fcb);
fg = fl - (0.71414 * fcb) - (0.34414 * fcr);
fb = fl + (1.77200 * fcr);
if (fr < 0.0) fr = 0.0;
else if (fr > 255.0) fr = 255.0;
if (fg < 0.0) fg = 0.0;
else if (fg > 255.0) fg = 255.0;
if (fb < 0.0) fb = 0.0;
else if (fb > 255.0) fb = 255.0;
*r = (unsigned char) fr;
*g = (unsigned char) fg;
*b = (unsigned char) fb;
}
static void
InitColormap (int *NumColors, ColormapEntry **Map)
{
int i, lum_num, cr_num, cb_num;
*NumColors = LUM_RANGE*CB_RANGE*CR_RANGE;
if (ditherType == NO_DITHER) return;
*Map = (ColormapEntry *) malloc (*NumColors * sizeof (ColormapEntry));
for (i = 0; i < *NumColors; i++)
{
lum_num = (i / (CR_RANGE*CB_RANGE))%LUM_RANGE;
cr_num = (i / CB_RANGE)%CR_RANGE;
cb_num = i % CB_RANGE;
ConvertColor(lum_values[lum_num], cr_values[cr_num], cb_values[cb_num],
&(*Map)[i].red, &(*Map)[i].green, &(*Map)[i].blue);
pixel[i] = i;
}
}
static void
InitGrayColormap (int *NumColors, ColormapEntry **Map)
{
int i;
*NumColors = 256 ;
if (ditherType == NO_DITHER) return;
*Map = (ColormapEntry *) malloc (*NumColors * sizeof (ColormapEntry));
for (i = 0; i < *NumColors; i++)
{
(*Map)[i].red = (*Map)[i].green = (*Map)[i].blue = i;
pixel[i] = i;
}
}
void
InitDither (ImageDesc *Image)
{
switch (ditherType)
{
case HYBRID_DITHER:
InitColor ();
InitHybridDither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case HYBRID2_DITHER:
InitColor ();
InitHybridErrorDither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case FS4_DITHER:
InitColor ();
InitFS4Dither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case FS2_DITHER:
InitColor ();
InitFS2Dither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case FS2FAST_DITHER:
InitColor ();
InitFS2FastDither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case Twox2_DITHER:
InitColor ();
Init2x2Dither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
PostInit2x2Dither ();
break;
case GRAY_DITHER:
InitGrayColormap (&Image->ColormapSize, &Image->Colormap);
break;
case FULL_COLOR_DITHER:
InitColorDither ();
Image->ColormapSize = -1;
Image->Colormap = 0 ;
break;
case NO_DITHER:
break;
case ORDERED_DITHER:
InitColor ();
InitOrderedDither ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
break;
case MONO_DITHER:
case MONO_THRESHOLD:
break;
case ORDERED2_DITHER:
InitColor ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
InitOrdered2Dither ();
break;
case MBORDERED_DITHER:
InitColor ();
InitColormap (&Image->ColormapSize, &Image->Colormap);
InitMBOrderedDither ();
break;
}
}
More information about the Gcc-bugs
mailing list