egcs-current c++ still segfaults with this one

Matthias Urlichs smurf@noris.de
Sun May 24 07:59:00 GMT 1998


I may or may not have sent this in a few days ago.
Help in digging this one (or, even better, a patch ;-) out would be much
appreciated. Unfortunately, I was unable to create a smaller test case.

This is under linux/glibc-current.

gcc -B../ -v qga.cpp


Reading specs from ../specs
gcc driver version egcs-2.91.29 19980517 (gcc2 ss-980502 experimental) executing gcc version egcs-2.91.30
 ../cc1plus /tmp/ccElbxOJ.ii -quiet -dumpbase qga.cc -version -o /tmp/ccElbxOJ.s
GNU C++ version egcs-2.91.30 19980524 (gcc2 ss-980502 experimental) (i586-pc-linux-gnu) compiled by GNU C version egcs-2.91.24 19980418 (gcc2 ss-980401 experimental).
qga.cpp: gcc: Internal compiler error: program cc1plus got fatal signal 11


######### qga.cpp:

template<class type> class QIntDictT
{
};

class QGArray					 
{
public:
    QGArray( int size );			 
    virtual void detach()	{ }
};

template<class type> class QArrayT : public QGArray
{
public:
    QArrayT( int size ) : QGArray(size*sizeof(type)) {}

    void  detach()		{ QGArray::detach(); }
};

class QPoint
{
public: bool   isNull()	const;
};


class QRect					 
{
};

class QWidget
{						 
public:
    QWidget( QWidget *parent=0, const char *name=0 );
   ~QWidget();

    void setAutoMinimumSize( bool ) {}
    const char	*iconText()	const;
};

class QGList
{
public:
    int  count() const;			 
    void  clear();				 
};

template<class type> class QListT : public QGList
{
public:
    int  count()   const		{ return QGList::count(); }
};

class QFrame : public QWidget			 
{
};

struct WidgetInfo {
    QRect geom;
    QWidget *widget;
};
typedef QIntDictT <WidgetInfo> wDict;

class QChain
{
public:
    QChain() { }
    virtual ~QChain() {}
    virtual void distribute( wDict&) = 0;
};
class QSerChain : public QChain
{
public:
    QSerChain( ) : QChain( ), empty(1) {}
    ~QSerChain();
    void distribute( wDict &);
    bool empty;
    QListT <QChain> chain;
};
void QSerChain::distribute( wDict & wd )
{
    typedef int fixed;
    QArrayT <fixed> sizes( chain.count() );
}

-- 
Matthias Urlichs
noris network GmbH



More information about the Gcc-bugs mailing list