This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
EGCS 1.1.1 compile-time error on SPARC/Solaris for xlsubr.c from 022.li
- To: egcs-bugs at cygnus dot com
- Subject: EGCS 1.1.1 compile-time error on SPARC/Solaris for xlsubr.c from 022.li
- From: David G Hough at validgh <validgh at validgh dot com>
- Date: Thu, 11 Feb 1999 13:31:57 -0800 (PST)
Probably the same bug as reported yesterday, but with a different source file;
022.li and 130.li are SPEC benchmark programs:
/net/validator/export/set/validator7/gcc/egcs111/bin/gcc -v
Reading specs from /net/validator/export/set/validator7/gcc/egcs111/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/net/validator/export/set/validator7/gcc/egcs111/bin/gcc xlsubr.c -c -O2 -mcpu=v9
gcc: Internal compiler error: program cc1 got fatal signal 10
-O1 or v8 cures.
#ident "@(#)stdio.h 1.69 98/07/13 SMI"
#ident "@(#)feature_tests.h 1.17 97/12/04 SMI"
#ident "@(#)isa_defs.h 1.15 97/11/22 SMI"
#ident "@(#)va_list.h 1.11 97/11/22 SMI"
typedef char *__va_list;
#ident "@(#)stdio_tag.h 1.3 98/04/20 SMI"
typedef struct __FILE __FILE;
#ident "@(#)stdio_impl.h 1.7 98/04/17 SMI"
typedef int ssize_t;
struct __FILE
{
ssize_t _cnt;
unsigned char *_ptr;
unsigned char *_base;
unsigned char _flag;
unsigned char _file;
unsigned __orientation:2;
unsigned __filler:6;
};
typedef __FILE FILE;
typedef unsigned int size_t;
typedef long long __longlong_t;
typedef long off_t;
typedef __longlong_t off64_t;
typedef long fpos_t;
typedef __longlong_t fpos64_t;
extern FILE _iob[20];
extern unsigned char _sibuf[], _sobuf[];
extern unsigned char *_bufendtab[];
extern FILE *_lastbuf;
extern int remove();
extern int rename();
extern FILE *tmpfile();
extern char *tmpnam();
extern int fclose();
extern int fflush();
extern FILE *fopen();
extern FILE *freopen();
extern void setbuf();
extern void setbuffer();
extern int setlinebuf();
extern int setvbuf();
extern int fprintf();
extern int fscanf();
extern int printf();
extern int scanf();
extern int sprintf();
extern int sscanf();
extern int vfprintf();
extern int vprintf();
extern int vsprintf();
extern int fgetc();
extern char *fgets();
extern int fputc();
extern int fputs();
extern int getc();
extern int getchar();
extern char *gets();
extern int putc();
extern int putchar();
extern int puts();
extern int ungetc();
extern size_t fread();
extern size_t fwrite();
extern int fgetpos();
extern int fseek();
extern int fsetpos();
extern long ftell();
extern void rewind();
extern void clearerr();
extern int feof();
extern int ferror();
extern void perror();
extern int _filbuf();
extern int _flsbuf();
extern int fseeko();
extern off_t ftello();
extern FILE *fopen64();
extern FILE *freopen64();
extern FILE *tmpfile64();
extern int fgetpos64();
extern int fsetpos64();
extern int fseeko64();
extern off64_t ftello64();
#ident "@(#)ctype.h 1.30 98/01/16 SMI"
extern unsigned char _ctype[];
#ident "@(#)setjmp.h 1.32 98/01/30 SMI"
typedef int jmp_buf[12];
typedef int sigjmp_buf[19];
extern int setjmp();
#pragma unknown_control_flow(setjmp)
extern int _setjmp();
#pragma unknown_control_flow(_setjmp)
extern void longjmp();
extern void _longjmp();
extern int sigsetjmp();
#pragma unknown_control_flow(sigsetjmp)
extern void siglongjmp();
typedef struct node {
char n_type;
char n_flags;
union {
struct xsym {
struct node *xsy_plist;
struct node *xsy_value;
} n_xsym;
struct xsubr {
struct node *(*xsu_subr)();
} n_xsubr;
struct xlist {
struct node *xl_car;
struct node *xl_cdr;
} n_xlist;
struct xint {
long xi_int;
} n_xint;
struct xfloat {
float xf_float;
} n_xfloat;
struct xstr {
int xst_type;
char *xst_str;
} n_xstr;
struct xfptr {
FILE *xf_fp;
int xf_savech;
} n_xfptr;
struct xvect {
int xv_size;
struct node **xv_data;
} n_xvect;
} n_info;
} NODE;
typedef struct context {
int c_flags;
struct node *c_expr;
jmp_buf c_jmpbuf;
struct context *c_xlcontext;
struct node ***c_xlstack;
struct node *c_xlenv;
int c_xltrace;
} CONTEXT;
struct fdef {
char *f_name;
int f_type;
struct node *(*f_fcn)();
};
struct segment {
int sg_size;
struct segment *sg_next;
struct node sg_nodes[1];
};
extern struct node ***xlsave();
extern struct node *xleval();
extern struct node *xlapply();
extern struct node *xlevlist();
extern struct node *xlarg();
extern struct node *xlevarg();
extern struct node *xlmatch();
extern struct node *xlevmatch();
extern struct node *xlgetfile();
extern struct node *xlsend();
extern struct node *xlenter();
extern struct node *xlsenter();
extern struct node *xlmakesym();
extern struct node *xlframe();
extern struct node *xlgetvalue();
extern struct node *xlxgetvalue();
extern struct node *xlygetvalue();
extern struct node *cons();
extern struct node *consa();
extern struct node *consd();
extern struct node *cvsymbol();
extern struct node *cvcsymbol();
extern struct node *cvstring();
extern struct node *cvcstring();
extern struct node *cvfile();
extern struct node *cvsubr();
extern struct node *cvfixnum();
extern struct node *cvflonum();
extern struct node *newstring();
extern struct node *newvector();
extern struct node *newobject();
extern struct node *xlgetprop();
extern char *xlsymname();
extern void xlsetvalue();
extern void xlprint();
extern void xltest();
extern NODE *k_test,*k_tnot,*s_eql;
extern NODE ***xlstack;
xlsubr(sname,type,subr)
char *sname; int type; NODE *(*subr)();
{
NODE *sym;
sym = xlsenter(sname);
((sym)->n_info.n_xsym.xsy_value = (cvsubr(subr,type)));
}
NODE *xlarg(pargs)
NODE **pargs;
{
NODE *arg;
if (!((*pargs) && (*pargs)->n_type == 3))
xlfail("too few arguments");
arg = ((*pargs)->n_info.n_xlist.xl_car);
*pargs = ((*pargs)->n_info.n_xlist.xl_cdr);
return (arg);
}
NODE *xlmatch(type,pargs)
int type; NODE **pargs;
{
NODE *arg;
arg = xlarg(pargs);
if (type == 3) {
if (arg && ((arg)->n_type) != 3)
xlerror("bad argument type",arg);
}
else {
if (arg == (NODE *)0 || ((arg)->n_type) != type)
xlerror("bad argument type",arg);
}
return (arg);
}
NODE *xlevarg(pargs)
NODE **pargs;
{
NODE ***oldstk,*val;
oldstk = xlsave(&val,(NODE **)0);
val = xlarg(pargs);
val = xleval(val);
xlstack = oldstk;
return (val);
}
NODE *xlevmatch(type,pargs)
int type; NODE **pargs;
{
NODE *arg;
arg = xlevarg(pargs);
if (type == 3) {
if (arg && ((arg)->n_type) != 3)
xlerror("bad argument type",arg);
}
else {
if (arg == (NODE *)0 || ((arg)->n_type) != type)
xlerror("bad argument type",arg);
}
return (arg);
}
void xltest(pfcn,ptresult,pargs)
NODE **pfcn; int *ptresult; NODE **pargs;
{
NODE *arg;
if (!((*pargs) && (*pargs)->n_type == 3)) {
*pfcn = ((s_eql)->n_info.n_xsym.xsy_value);
*ptresult = 1;
return;
}
arg = ((*pargs)->n_info.n_xlist.xl_car);
if (arg == k_test)
*ptresult = 1;
else if (arg == k_tnot)
*ptresult = 0;
else
xlfail("expecting :test or :test-not");
*pargs = ((*pargs)->n_info.n_xlist.xl_cdr);
if (!((*pargs) && (*pargs)->n_type == 3))
xlfail("no value for keyword argument");
*pfcn = ((*pargs)->n_info.n_xlist.xl_car);
if (((*pfcn) && (*pfcn)->n_type == 4))
*pfcn = xleval(*pfcn);
*pargs = ((*pargs)->n_info.n_xlist.xl_cdr);
}
NODE *xlgetfile(pargs)
NODE **pargs;
{
NODE *arg;
if (arg = xlarg(pargs)) {
if (((arg) && (arg)->n_type == 8)) {
if (arg->n_info.n_xfptr.xf_fp == 0)
xlfail("file not open");
}
else if (!((arg) && (arg)->n_type == 3))
xlerror("bad argument type",arg);
}
return (arg);
}
xllastarg(args)
NODE *args;
{
if (args)
xlfail("too many arguments");
}
int eq(arg1,arg2)
NODE *arg1,*arg2;
{
return (arg1 == arg2);
}
int eql(arg1,arg2)
NODE *arg1,*arg2;
{
if (eq(arg1,arg2))
return (1);
else if (((arg1) && (arg1)->n_type == 5) && ((arg2) && (arg2)->n_type == 5))
return (arg1->n_info.n_xint.xi_int == arg2->n_info.n_xint.xi_int);
else if (((arg1) && (arg1)->n_type == 9) && ((arg2) && (arg2)->n_type == 9))
return (arg1->n_info.n_xfloat.xf_float == arg2->n_info.n_xfloat.xf_float);
else if (((arg1) && (arg1)->n_type == 6) && ((arg2) && (arg2)->n_type == 6))
return (strcmp(arg1->n_info.n_xstr.xst_str,arg2->n_info.n_xstr.xst_str) == 0);
else
return (0);
}
int equal(arg1,arg2)
NODE *arg1,*arg2;
{
if (eql(arg1,arg2))
return (1);
else if (((arg1) && (arg1)->n_type == 3) && ((arg2) && (arg2)->n_type == 3))
return (equal(((arg1)->n_info.n_xlist.xl_car),((arg2)->n_info.n_xlist.xl_car)) && equal(((arg1)->n_info.n_xlist.xl_cdr),((arg2)->n_info.n_xlist.xl_cdr)));
else
return (0);
}