Article View: gnu.g++.bug
Article #190gcc-2.2.2 gets fatal signal
From: Stefano Casadei
Date: Thu, 06 Aug 1992 16:50
Date: Thu, 06 Aug 1992 16:50
1768 lines
34469 bytes
34469 bytes
The compiler crashes on file bug.cc (after a few minutes)
cesena-63->gcc -v -pipe -I../include -I../prinst -I../g++-include -I../iostream -I../libg++ -c -o picture.o bug.cc
Reading specs from /verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cpp -lang-c++ -v -I../include -I../prinst -I../g++-include -I../iostream -I../libg++ -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix bug.cc |
/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cc1plus -quiet -dumpbase bug.cc -version -o - |
as - -o picture.o
GNU CPP version 2.2.2 (sparc)
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
gcc: Internal compiler error: program cc1plus got fatal signal 11
--------------------------- file bug.cc
# 1 "picture.cc"
# 1 "../include/declar.h" 1
# 1 "../iostream/iostream.h" 1 3
#pragma interface
# 1 "../iostream/streambuf.h" 1 3
#pragma interface
# 1 "../libg++/_G_config.h" 1 3
# 23 "../iostream/streambuf.h" 2 3
class ostream; class streambuf; class backupbuf;
extern "C" int __underflow(streambuf*);
extern "C" int __overflow(streambuf*, int);
typedef long streamoff;
typedef long streampos;
typedef unsigned long __fmtflags;
typedef unsigned char __iostate;
struct _ios_fields {
streambuf *_strbuf;
ostream* _tie;
int _width;
__fmtflags _flags;
char _fill;
__iostate _state;
unsigned short _precision;
};
# 87 "../iostream/streambuf.h" 3
class ios : public _ios_fields {
public:
typedef __fmtflags fmtflags;
typedef __iostate iostate;
enum io_state {
goodbit = 0 ,
eofbit = 1 ,
failbit = 2 ,
badbit = 4 };
enum open_mode {
in = 1 ,
out = 2 ,
ate = 4 ,
app = 8 ,
trunc = 16 ,
nocreate = 32 ,
noreplace = 64 };
enum seek_dir { beg, cur, end};
enum { skipws=01, left=02, right=04, internal=010,
dec=020, oct=040, hex=0100,
showbase=0200, showpoint=0400, uppercase=01000, showpos=02000,
scientific=04000, fixed=0100000, unitbuf=020000, stdio=040000,
dont_close=0x80000000
};
ostream* tie() const { return _tie; }
ostream* tie(ostream* val) { ostream* save=_tie; _tie=val; return save; }
char fill() const { return _fill; }
char fill(char newf) { char oldf = _fill; _fill = newf; return oldf; }
fmtflags flags() const { return _flags; }
fmtflags flags(fmtflags new_val) {
fmtflags old_val = _flags; _flags = new_val; return old_val; }
int precision() const { return _precision; }
int precision(int newp) {
unsigned short oldp = _precision; _precision = (unsigned short)newp;
return oldp; }
fmtflags setf(fmtflags val) {
fmtflags oldbits = _flags;
_flags |= val; return oldbits; }
fmtflags setf(fmtflags val, fmtflags mask) {
fmtflags oldbits = _flags;
_flags = (_flags & ~mask) | (val & mask); return oldbits; }
fmtflags unsetf(fmtflags mask) {
fmtflags oldbits = _flags & mask;
_flags &= ~mask; return oldbits; }
int width() const { return _width; }
int width(int val) { int save = _width; _width = val; return save; }
static const unsigned long basefield;
static const unsigned long adjustfield;
static const unsigned long floatfield;
streambuf* rdbuf() const { return _strbuf; }
void clear(iostate state = 0) { _state = state; }
void set(iostate flag) { _state |= flag; }
int good() const { return _state == 0; }
int eof() const { return _state & ios::eofbit; }
int fail() const { return _state & (ios::badbit|ios::failbit); }
int bad() const { return _state & ios::badbit; }
int rdstate() const { return _state; }
operator void*() const { return fail() ? (void*)0 : (void*)(-1); }
int operator!() const { return fail(); }
protected:
ios(streambuf* sb = 0, ostream* tie = 0);
~ios();
};
typedef ios::seek_dir _seek_dir;
class streammarker {
friend class streambuf;
friend int __underflow(streambuf*);
struct streammarker *_next;
streambuf *_sbuf;
streampos _spos;
void set_streampos(streampos sp) { _spos = sp; }
void set_offset(int offset) { _pos = offset; _spos = (streampos)(-2); }
int _pos;
public:
streammarker(streambuf *sb);
~streammarker();
int saving() { return _spos == -2; }
int delta(streammarker&);
int delta();
};
struct __streambuf {
int _flags;
char* _gptr;
char* _egptr;
char* _eback;
char* _pbase;
char* _pptr;
char* _epptr;
char* _base;
char* _ebuf;
struct streambuf *_chain;
friend class streammarker;
char *_other_gbase;
char *_aux_limit;
char *_other_egptr;
streammarker *_markers;
unsigned short _cur_column;
char _unused;
char _shortbuf[1];
};
extern unsigned __adjust_column(unsigned start, const char *line, int count);
struct streambuf : private __streambuf {
friend class ios;
friend class istream;
friend class ostream;
friend class streammarker;
friend int __underflow(streambuf*);
protected:
static streambuf* _list_all;
streambuf*& xchain() { return _chain; }
void _un_link();
void _link_in();
char* gptr() const { return _gptr; }
char* pptr() const { return _pptr; }
char* egptr() const { return _egptr; }
char* epptr() const { return _epptr; }
char* pbase() const { return _pbase; }
char* eback() const { return _eback; }
char* ebuf() const { return _ebuf; }
char* base() const { return _base; }
void xput_char(char c) { *_pptr++ = c; }
int xflags() { return _flags; }
int xflags(int f) { int fl = _flags; _flags = f; return fl; }
void xsetflags(int f) { _flags |= f; }
void xsetflags(int f, int mask) { _flags = (_flags & ~mask) | (f & mask); }
void gbump(int n) { _gptr += n; }
void pbump(int n) { _pptr += n; }
void setb(char* b, char* eb, int a=0);
void setp(char* p, char* ep) { _pbase=_pptr=p; _epptr=ep; }
void setg(char* eb, char* g, char *eg) { _eback=eb; _gptr=g; _egptr=eg; }
char *shortbuf() { return _shortbuf; }
int in_backup() { return _flags & 0x100 ; }
char *Gbase() { return in_backup() ? _other_gbase : _eback; }
char *eGptr() { return in_backup() ? _other_egptr : _egptr; }
char *Bbase() { return in_backup() ? _eback : _other_gbase; }
char *Bptr() { return _aux_limit; }
char *eBptr() { return in_backup() ? _egptr : _other_egptr; }
char *Nbase() { return _other_gbase; }
char *eNptr() { return _other_egptr; }
int have_backup() { return _other_gbase != ((void*)0) ; }
int have_markers() { return _markers != ((void*)0) ; }
int _least_marker();
void switch_to_main_get_area();
void switch_to_backup_area();
void free_backup_area();
void unsave_markers();
int put_mode() { return _flags & 0x800 ; }
int switch_to_get_mode();
streambuf(int flags=0);
public:
static int flush_all();
static void flush_all_linebuffered();
virtual int underflow() = 0;
virtual int overflow(int c = (-1) ) = 0;
virtual int doallocate();
virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out);
virtual streampos seekpos(streampos pos, int mode = ios::in|ios::out);
int seekmark(streammarker& mark, int delta = 0);
int sputbackc(char c);
int sungetc();
virtual ~streambuf();
int unbuffered() { return _flags & 2 ? 1 : 0; }
int linebuffered() { return _flags & 0x200 ? 1 : 0; }
void unbuffered(int i)
{ if (i) _flags |= 2 ; else _flags &= ~2 ; }
void linebuffered(int i)
{ if (i) _flags |= 0x200 ; else _flags &= ~0x200 ; }
int allocate() {
if (base() || unbuffered()) return 0;
else return doallocate(); }
void allocbuf() { if (base() == ((void*)0) ) doallocbuf(); }
void doallocbuf();
virtual int sync();
virtual int pbackfail(int c);
virtual int ungetfail();
virtual streambuf* setbuf(char* p, int len);
int in_avail() { return _egptr - _gptr; }
int out_waiting() { return _pptr - _pbase; }
virtual int sputn(const char* s, int n);
int padn(char pad, int n);
virtual int sgetn(char* s, int n);
int ignore(int);
virtual int get_column();
virtual int set_column(int);
long sgetline(char* buf, int n, char delim, int putback_delim);
int sbumpc() {
if (_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ;
else return *(unsigned char*)_gptr++; }
int sgetc() {
if (_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ;
else return *(unsigned char*)_gptr; }
int snextc() {
if (++_gptr >= _egptr && __underflow(this) == (-1) ) return (-1) ;
else return *(unsigned char*)_gptr; }
int sputc(int c) {
if (_pptr >= _epptr) return __overflow(this, (unsigned char)c);
return *_pptr++ = c, (unsigned char)c; }
void stossc() { if (_gptr < _egptr) _gptr++; }
int vscan(char const *fmt0, char * ap, ios::iostate* = ((void*)0) );
int vform(char const *fmt0, char * ap);
};
class backupbuf : public streambuf {
friend class streammarker;
protected:
backupbuf(int flags=0) : streambuf(flags|0x4000 ) { }
public:
virtual int pbackfail(int c);
virtual int underflow();
virtual int overflow(int c = (-1) );
};
struct __file_fields {
short _fileno;
int _blksize;
long _offset;
};
class filebuf : public backupbuf {
protected:
struct __file_fields _fb;
void init();
public:
filebuf();
filebuf(int fd);
filebuf(int fd, char* p, int len);
~filebuf();
filebuf* attach(int fd);
filebuf* open(const char *filename, const char *mode);
filebuf* open(const char *filename, int mode, int prot = 0664);
virtual int underflow();
virtual int overflow(int c = (-1) );
int is_open() { return _fb._fileno >= 0; }
int fd() { return is_open() ? _fb._fileno : (-1) ; }
filebuf* close();
virtual int doallocate();
virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out);
int sputn(const char* s, int n);
int sgetn(char* s, int n);
virtual int sync();
protected:
int is_reading() { return eback() != egptr(); }
char* cur_ptr() { return is_reading() ? gptr() : pptr(); }
char* file_ptr() { return eGptr(); }
int do_write(const char *data, int to_do);
int do_flush() { return do_write(_pbase, _pptr-_pbase); }
virtual int sys_read(char* buf, int size);
virtual long sys_seek(long , _seek_dir);
virtual int sys_write(const void*, long);
virtual int sys_stat(void*);
virtual int sys_close();
};
inline ios::ios(streambuf* sb , ostream* tie ) {
_tie = tie; _strbuf=sb; _state=0; _width=0; _fill=' ';
_flags=ios::skipws; _precision=6; }
inline ios::~ios() {
if (!(_flags & (unsigned int)ios::dont_close)) delete _strbuf; }
# 25 "../iostream/iostream.h" 2 3
class istream; class ostream;
typedef ios& (*__manip)(ios&);
typedef istream& (*__imanip)(istream&);
typedef ostream& (*__omanip)(ostream&);
extern istream& ws(istream& ins);
extern ostream& flush(ostream& outs);
extern ostream& endl(ostream& outs);
extern ostream& ends(ostream& outs);
class ostream : public ios
{
void do_osfx();
public:
ostream() { }
ostream(streambuf* sb, ostream* tied=((void*)0) );
int opfx() { if (!good()) return 0; if (_tie) _tie->flush(); return 1; }
void osfx() { if (flags() & (ios::unitbuf|ios::stdio))
do_osfx(); }
streambuf* ostreambuf() const { return _strbuf; }
ostream& flush();
ostream& put(char c) { _strbuf->sputc(c); return *this; }
ostream& write(const char *s, int n);
ostream& write(const unsigned char *s, int n) { return write((const char*)s, n);}
ostream& write(const signed char *s, int n) { return write((const char*)s, n);}
ostream& write(const void *s, int n) { return write((const char*)s, n);}
ostream& seekp(streampos);
ostream& seekp(streamoff, _seek_dir);
streampos tellp();
ostream& form(const char *format ...);
ostream& vform(const char *format, char * args);
};
extern ostream& operator<<(ostream&, char c);
inline ostream& operator<<(ostream& os, unsigned char c)
{ return os << (char)c; }
extern ostream& operator<<(ostream &os, signed char c) { return os << (char)c;}
extern ostream& operator<<(ostream&, const char *s);
inline ostream& operator<<(ostream& os, const unsigned char *s)
{ return os << (const char*)s; }
inline ostream& operator<<(ostream& os, const signed char *s)
{ return os << (const char*)s; }
extern ostream& operator<<(ostream&, void *p);
extern ostream& operator<<(ostream&, int n);
extern ostream& operator<<(ostream&, long n);
extern ostream& operator<<(ostream&, unsigned int n);
extern ostream& operator<<(ostream&, unsigned long n);
inline ostream& operator<<(ostream& os, short n) {return os << (int)n;}
inline ostream& operator<<(ostream& os, unsigned short n)
{return os << (unsigned int)n;}
extern ostream& operator<<(ostream&, float n);
extern ostream& operator<<(ostream&, double n);
inline ostream& operator<<(ostream& os, __omanip func) { return (*func)(os); }
inline ostream& operator<<(ostream& os, __manip func) {(*func)(os); return os;}
extern ostream& operator<<(ostream&, streambuf*);
class istream : public ios
{
int _gcount;
int _skip_ws();
public:
istream() { _gcount = 0; }
istream(streambuf* sb, ostream*tied=((void*)0) );
streambuf* istreambuf() const { return _strbuf; }
istream& get(char& c);
istream& get(unsigned char& c) { return get((char&)c); }
istream& get(signed char& c) { return get((char&)c); }
istream& read(char *ptr, int n);
istream& read(unsigned char *ptr, int n) { return read((char*)ptr, n); }
istream& read(signed char *ptr, int n) { return read((char*)ptr, n); }
istream& read(void *ptr, int n) { return read((char*)ptr, n); }
istream& getline(char* ptr, int len, char delim = '\n');
istream& get(char* ptr, int len, char delim = '\n');
istream& get(streambuf& sb, char delim = '\n');
istream& gets(char **s, char delim = '\n');
int ipfx(int need) {
if (!good()) { set(ios::failbit); return 0; }
if (_tie && (need == 0 || rdbuf()->in_avail() < need)) _tie->flush();
if (!need && (flags() & ios::skipws)) return _skip_ws();
return 1;
}
int ipfx0() {
if (!good()) { set(ios::failbit); return 0; }
if (_tie) _tie->flush();
if (flags() & ios::skipws) return _skip_ws();
return 1;
}
int ipfx1() {
if (!good()) { set(ios::failbit); return 0; }
if (_tie && rdbuf()->in_avail() == 0) _tie->flush();
return 1;
}
int get() { if (!ipfx1()) return (-1) ;
int ch = _strbuf->sbumpc();
if (ch == (-1) ) set(ios::eofbit);
return ch; }
int peek() { if (!ipfx1()) return (-1) ;
int ch = _strbuf->sgetc();
if (ch == (-1) ) set(ios::eofbit);
return ch; }
int gcount() { return _gcount; }
istream& ignore(int n=1, int delim = (-1) );
istream& seekg(streampos);
istream& seekg(streamoff, _seek_dir);
streampos tellg();
istream& putback(char ch) {
if (good() && _strbuf->sputbackc(ch) == (-1) ) clear(ios::badbit);
return *this;}
istream& unget() {
if (good() && _strbuf->sungetc() == (-1) ) clear(ios::badbit);
return *this;}
istream& scan(const char *format ...);
istream& vscan(const char *format, char * args);
};
extern istream& operator>>(istream&, char*);
inline istream& operator>>(istream& is, unsigned char* p)
{ return is >> (char*)p; }
inline istream& operator>>(istream& is, signed char*p) {return is >> (char*)p;}
extern istream& operator>>(istream&, char& c);
extern istream& operator>>(istream& s, unsigned char& c) {return s>>(char&)c;}
extern istream& operator>>(istream& s, signed char& c) {return s >> (char&)c;}
extern istream& operator>>(istream&, int&);
extern istream& operator>>(istream&, long&);
extern istream& operator>>(istream&, short&);
extern istream& operator>>(istream&, unsigned int&);
extern istream& operator>>(istream&, unsigned long&);
extern istream& operator>>(istream&, unsigned short&);
extern istream& operator>>(istream&, float&);
extern istream& operator>>(istream&, double&);
inline istream& operator>>(istream& is, __manip func) {(*func)(is); return is;}
inline istream& operator>>(istream& is, __imanip func) { return (*func)(is); }
extern istream& operator>>(istream&, streambuf*);
class iostream : public ios {
int _gcount;
public:
iostream() { _gcount = 0; }
iostream(streambuf* sb, ostream*tied=((void*)0) );
operator istream&() { return *(istream*)this; }
operator ostream&() { return *(ostream*)this; }
istream& get(char& c) { return ((istream*)this)->get(c); }
istream& get(unsigned char& c) { return ((istream*)this)->get((char&)c); }
istream& get(signed char& c) { return ((istream*)this)->get((char&)c); }
istream& read(char *ptr, int n) { return ((istream*)this)->read(ptr, n); }
istream& read(unsigned char *ptr, int n)
{ return ((istream*)this)->read((char*)ptr, n); }
istream& read(signed char *ptr, int n)
{ return ((istream*)this)->read((char*)ptr, n); }
istream& read(void *ptr, int n)
{ return ((istream*)this)->read((char*)ptr, n); }
istream& getline(char* ptr, int len, char delim = '\n')
{ return ((istream*)this)->getline(ptr, len, delim); }
istream& get(char* ptr, int len, char delim = '\n')
{ return ((istream*)this)->get(ptr, len, delim); }
istream& gets(char **s, char delim = '\n')
{ return ((istream*)this)->gets(s, delim); }
istream& ignore(int n=1, int delim = (-1) )
{ return ((istream*)this)->ignore(n, delim); }
int ipfx(int need) { return ((istream*)this)->ipfx(need); }
int ipfx0() { return ((istream*)this)->ipfx0(); }
int ipfx1() { return ((istream*)this)->ipfx1(); }
int get() { return _strbuf->sbumpc(); }
int peek() { return ipfx1() ? _strbuf->sgetc() : (-1) ; }
int gcount() { return _gcount; }
istream& putback(char ch) { return ((istream*)this)->putback(ch); }
istream& unget() { return ((istream*)this)->unget(); }
istream& seekg(streampos pos) { return ((istream*)this)->seekg(pos); }
istream& seekg(streamoff off, _seek_dir dir)
{ return ((istream*)this)->seekg(off, dir); }
streampos tellg() { return ((istream*)this)->tellg(); }
istream& scan(const char *format ...);
istream& vscan(const char *format, char * args)
{ return ((istream*)this)->vscan(format, args); }
int opfx() { return ((ostream*)this)->opfx(); }
void osfx() { ((ostream*)this)->osfx(); }
ostream& flush() { return ((ostream*)this)->flush(); }
ostream& put(char c) { return ((ostream*)this)->put(c); }
ostream& write(const char *s, int n)
{ return ((ostream*)this)->write(s, n); }
ostream& write(const unsigned char *s, int n)
{ return ((ostream*)this)->write((const char*)s, n); }
ostream& write(const signed char *s, int n)
{ return ((ostream*)this)->write((const char*)s, n); }
ostream& write(const void *s, int n)
{ return ((ostream*)this)->write((const char*)s, n); }
ostream& form(const char *format ...);
ostream& vform(const char *format, char * args)
{ return ((ostream*)this)->vform(format, args); }
ostream& seekp(streampos pos) { return ((ostream*)this)->seekp(pos); }
ostream& seekp(streamoff off, _seek_dir dir)
{ return ((ostream*)this)->seekp(off, dir); }
streampos tellp() { return ((ostream*)this)->tellp(); }
};
extern istream cin;
extern ostream cout, cerr, clog;
struct Iostream_init { } ;
inline ios& dec(ios& i)
{ i.setf(ios::dec, ios::dec|ios::hex|ios::oct); return i; }
inline ios& hex(ios& i)
{ i.setf(ios::hex, ios::dec|ios::hex|ios::oct); return i; }
inline ios& oct(ios& i)
{ i.setf(ios::oct, ios::dec|ios::hex|ios::oct); return i; }
# 4 "../include/declar.h" 2
# 1 "../g++-include/assert.h" 1 3
extern "C" {
# 1 "../g++-include/stdio.h" 1 3
#pragma interface
extern "C" {
# 1 "/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stdio.h" 1 3
extern struct _iobuf {
int _cnt;
unsigned char *_ptr;
unsigned char *_base;
int _bufsiz;
short _flag;
char _file;
} _iob[];
extern struct _iobuf *__hide_fopen ();
extern struct _iobuf *__hide_fdopen ();
extern struct _iobuf *__hide_freopen ();
extern struct _iobuf *__hide_popen ();
extern struct _iobuf *tmpfile();
extern long __hide_ftell ();
extern char *fgets();
extern char *gets();
extern char *__hide_sprintf ();
extern char *ctermid();
extern char *cuserid();
extern char *__hide_tempnam ();
extern char *tmpnam();
# 69 "../g++-include/stdio.h" 2 3
}
extern "C" {
int fclose(struct _iobuf *);
struct _iobuf * fdopen(int, const char*);
int fflush(struct _iobuf *);
int fgetc(struct _iobuf *);
char* fgets(char*, int, struct _iobuf *);
struct _iobuf * fopen(const char*, const char*);
int fprintf(struct _iobuf *, const char* ...);
int fputc(int, struct _iobuf *);
int fputs(const char*, struct _iobuf *);
int fread(void*, int , int , struct _iobuf *);
struct _iobuf * freopen(const char*, const char*, struct _iobuf *);
int fscanf(struct _iobuf *, const char* ...);
int fseek(struct _iobuf *, long, int);
long ftell(struct _iobuf *);
int fwrite(const void*, int , int , struct _iobuf *);
char* gets(char*);
int getw(struct _iobuf *);
int pclose(struct _iobuf *);
void perror(const char*);
struct _iobuf * popen(const char*, const char*);
int printf(const char* ...);
int puts(const char*);
int putw(int, struct _iobuf *);
int rewind(struct _iobuf *);
int scanf(const char* ...);
void setbuf(struct _iobuf *, char*);
void setbuffer(struct _iobuf *, char*, int);
int setlinebuf(struct _iobuf *);
int setvbuf(struct _iobuf *, char*, int, int );
int sscanf(char*, const char* ...);
struct _iobuf * tmpfile();
int ungetc(int, struct _iobuf *);
int vfprintf (...) ;
int vprintf (...) ;
char* sprintf (...) ;
char* vsprintf (...) ;
extern int _filbuf (...) ;
extern int _flsbuf (...) ;
}
# 8 "../g++-include/assert.h" 2 3
# 1 "/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/assert.h" 1 3
# 19 "/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/assert.h" 3
extern "C" {
extern void __eprintf (const char *, const char *, int, const char *);
}
# 50 "/verona/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/assert.h" 3
# 9 "../g++-include/assert.h" 2 3
}
# 5 "../include/declar.h" 2
typedef int Int;
typedef double Double;
class lmodel;
class lfacet;
class byte;
class frame;
class DoubleArray;
class DoubleImage;
class lmodelImage;
class picture;
template <class T> class pvector;
lmodelImage CompLmodels (picture,int,int);
double blob(double,double,double,double,double);
void goo(double,double,double);
const int ArraySize = 12;
const int Width = 10;
const int Height = 10;
void try_array(DoubleArray &);
void test_CLmodel();
void test_CompLmodels();
void test_subimage();
void test_ArrayDef();
# 1 "picture.cc" 2
# 1 "picture.h" 1
# 1 "../include/macros.h" 1
# 43 "../include/macros.h"
# 4 "picture.h" 2
# 1 "../include/lfacet.h" 1
# 1 "../include/pvector.h" 1
# 1 "../g++-include/math.h" 1 3
#pragma interface
# 64 "../g++-include/math.h" 3
extern "C" {
double acos(double);
double acosh(double);
double asin(double);
double asinh(double);
double atan(double);
double atan2(double, double);
double atanh(double);
double cbrt(double);
double ceil(double);
double copysign(double,double);
double cos(double);
double cosh(double);
double drem(double,double);
double erf(double);
double erfc(double);
double exp(double);
double expm1(double);
double fabs(double);
double finite(double);
double floor(double);
double fmod(double, double);
double frexp(double, int*);
double gamma(double);
double hypot(double,double);
double infnan(int);
int isinf(double);
int isnan(double);
double j0(double);
double j1(double);
double jn(int, double);
double ldexp(double, int);
double lgamma(double);
double log(double);
double log10(double);
double log1p(double);
double logb(double);
double modf(double, double*);
double pow(double, double);
double rint(double);
double scalb(double, int);
double sin(double);
double sinh(double);
double sqrt(double);
double tan(double);
double tanh(double);
double y0(double);
double y1(double);
double yn(int, double);
double aint(double);
double anint(double);
int irint(double);
int nint(double);
}
struct libm_exception
{
int type;
char* name;
double arg1, arg2, retval;
};
extern "C" int matherr(libm_exception*);
# 1 "../g++-include/values.h" 1 3
# 57 "../g++-include/values.h" 3
# 166 "../g++-include/values.h" 3
# 150 "../g++-include/math.h" 2 3
# 4 "../include/pvector.h" 2
template <class Type>
class pvector {
public:
operator double() {return 0;}
pvector( Type x = 0, Type y = 0) {xcomp = x; ycomp = y;}
Type get_xc() const {return xcomp;}
Type get_yc() const {return ycomp;}
double get_theta() const {return (xcomp==0&&ycomp==0) ? 0 : atan(ycomp/(double)xcomp)*180/ 3.14159265358979323846 ;}
double get_ro() const {return sqrt(xcomp*xcomp+ycomp*ycomp);}
friend ostream& operator<<(ostream&, pvector);
protected:
Type xcomp;
Type ycomp;
};
# 4 "../include/lfacet.h" 2
class lfacet : public pvector<double> {
public:
lfacet( double Av = 0, double x = 0, double y = 0) : pvector<double>(x,y),Avalue(Av) {}
lfacet( double Av, pvector<double> pvectd) : pvector<double>(pvectd),Avalue(Av) {}
operator double() {return 0;}
double get_A() const {return Avalue;};
double get_pixval(double x, double y) const {return Avalue+x*xcomp+y*ycomp;}
friend ostream& operator<<(ostream&, lfacet);
protected:
double Avalue;
};
# 5 "picture.h" 2
# 1 "../prinst/Double.Image.h" 1
# 1 "../include/Double.h" 1
# 4 "../prinst/Double.Image.h" 2
# 1 "../include/frame.h" 1
enum FrameMatchingMode { Center,TopLeft };
typedef FrameMatchingMode FMM;
class frame {
public:
frame ( int wid = Width, int hei = Height, int roff_i = 0, int coff_i = 0, const frame &supframe = 0);
int Iorc (int row, int col, frame fr) {return (roff+row)*fr.get_width() + coff + col;}
int get_width() const {return width;}
int get_height() const {return height;}
int get_size() const {return width*height;}
int get_roff() const {return roff;}
int get_coff() const {return coff;}
const frame *get_supframe_ptr() const {return supframe_ptr;}
double xoc(int col) const {return col+0.5-0.5*width ;}
double yor(int row) const {return -row-0.5+0.5*height ;}
int roR(int row, int roff) const {return row+roff;}
int coC(int col, int coff) const {return col+coff;}
int iorc(int row, int col) const {return col + width*row;}
int ioRC(int Row, int Col, int roff, int coff) const {return (roff+Row)*width + coff + Col;}
int Iorc (int row, int col) const {
((void) ((supframe_ptr) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../include/frame.h", 51, "supframe_ptr"), 0) )) ;
return (roff+row)*((frame *)supframe_ptr)->get_width() + coff + col; }
protected:
int width;
int height;
int roff;
int coff;
const frame *supframe_ptr;
};
# 5 "../prinst/Double.Image.h" 2
# 1 "../prinst/Double.Array.h" 1
# 1 "../include/Double.h" 1
# 5 "../prinst/Double.Array.h" 2
# 1 "../prinst/Double.Array.h" 1
# 51 "../prinst/Double.Array.h"
# 6 "../prinst/Double.Array.h" 2
class DoubleArray;
class DoubleResetArray { public: DoubleResetArray(int){}; };
ostream& operator<<( ostream&, DoubleArray&);
class DoubleArray {
public:
DoubleArray(int sz=ArraySize) {ia = new Double[size = sz]; ((void) ((ia) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Array.h", 16, "ia"), 0) )) ; }
DoubleArray(int sz, Double val) {DoubleArray(sz); fill(val); }
DoubleArray(int sz=ArraySize, DoubleResetArray RA=0) { init(0,sz); }
DoubleArray(const Double *ar, int sz) { init(ar,sz); }
DoubleArray(const DoubleArray &iA) { init (iA.ia, iA.size); }
~DoubleArray() { delete [] ia; }
operator DoubleArray();
DoubleArray& operator=(const DoubleArray&);
int getSize() {return size; }
void grow();
void fill ( Double val ) {for (int ix=0; ix<size; ++ix) ia[ix]=val;}
Double& operator[] (int ix) { assert_in_range(ix); return ia[ix]; }
Double get_value(int ix) const {assert_in_range(ix); return ia[ix];}
void print(ostream&);
private:
void swap(int,int);
void init(const Double*, int);
void assert_in_range(int ix) const {((void) ((ix>=0&&ix<size) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Array.h", 45, "ix>=0&&ix<size"), 0) )) ;}
int size;
Double *ia;
};
# 6 "../prinst/Double.Image.h" 2
# 1 "../prinst/Double.Image.h" 1
# 40 "../prinst/Double.Image.h"
# 8 "../prinst/Double.Image.h" 2
class DoubleImage : public frame {
public:
DoubleImage(int wid = Width, int hei = Height) : frame(wid,hei), data(get_size()) {}
DoubleImage(int wid, int hei, Double val) : frame(wid,hei), data(get_size(),val) {}
DoubleImage (const Double *imvec, int wid, int hei) : frame(wid,hei), data(imvec,wid*hei) {}
DoubleImage (const DoubleArray & imvec, int wid, int hei) : frame(wid,hei), data(imvec) {}
DoubleImage (const DoubleImage & im0,int wid,int hei,int roff,int coff, FMM fmm = TopLeft);
Double get_value(int row,int col) const { ((void) ((row<height&&col<width) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Image.h", 23, "row<height&&col<width"), 0) )) ;
return data.get_value(col+row*width);}
Double get_value(int ia) const {((void) ((ia<width*height) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Image.h", 25, "ia<width*height"), 0) )) ; return data.get_value(ia);}
Double set_value(int row, int col, Double val) { ((void) ((row<height&&col<width) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Image.h", 26, "row<height&&col<width"), 0) )) ;
return (data[col+row*width]=val);}
Double set_value(int ia, Double val) {((void) ((ia<width*height) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "../prinst/Double.Image.h", 28, "ia<width*height"), 0) )) ; return (data[ia]=val); }
void fill (Double val) {data.fill(val);}
friend ostream& operator << (ostream&, DoubleImage &);
protected:
DoubleArray data;
};
# 6 "picture.h" 2
class picture : public DoubleImage {
public:
picture(int wid = Width, int hei = Height) : DoubleImage(wid,hei) {}
picture(const Double *imvec, int wid, int hei) : DoubleImage(imvec,wid,hei) {}
picture(const DoubleArray & imvec, int wid, int hei) : DoubleImage(imvec,wid,hei) {}
picture(const DoubleImage & im0,int wid,int hei,int roff,int coff) : DoubleImage(im0,wid,hei,roff,coff) {}
picture(const lfacet, int,int);
picture(double a, double gx, double gy, int wid, int hei) {picture(lfacet(a,gx,gy),wid,hei);}
};
# 2 "picture.cc" 2
picture::picture(const lfacet lf, int wid, int hei) : DoubleImage(wid,hei)
{
}
Technical Details
Message-ID:
<1992Aug6.165013.20506@athena.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!verona.mit.edu!casadeiShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!verona.mit.edu!casadei From: casadei@verona.mit.edu (Stefano Casadei) Subject: gcc-2.2.2 gets fatal signal Message-ID: <1992Aug6.165013.20506@athena.mit.edu> Sender: gnulists@ai.mit.edu Organization: Massachusetts Institute of Technology Distribution: gnu Date: Thu, 6 Aug 1992 16:50:13 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 1769