This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/4994: ICE with "-fno-exceptions -O2 -mmmx -march=athlon"


I was able to reduce the testcase to the attached file:

# c++ -v
Reading specs from /3/gcc/HEAD/install/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: /3/gcc/HEAD/gcc/configure --enable-threads=posix 
--prefix=/3/gcc/HEAD/install
Thread model: posix
gcc version 3.1 20011226 (experimental)
# c++ -fno-exceptions -O2 -mmmx -march=athlon -c -fPIC sw5.cpp
sw5.cpp: In function `void activatedAddMenu(int)':
sw5.cpp:69: insn does not satisfy its constraints:
(insn 464 470 517 (set (reg/v/f:SI 29 emm0 [94])
        (reg/v/f:SI 30 emm1 [95])) 45 {*movsi_1} (nil)
    (nil))
sw5.cpp:69: Internal compiler error in reload_cse_simplify_operands, at
   reload1.c:8348
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4994
struct QStringData {
public:
    unsigned count;
    bool deref() { return !--count; }
    void deleteSelf();
};

class QString
{
public:
    QString();
    QString( const QString & );
    ~QString();

    QString &operator=( const QString & );

    QString arg( unsigned long a, int fieldwidth=0, int base=10 ) const;

private:
    QStringData *d;
    static QStringData* shared_null;
};

inline QString::~QString()
{
	if ( d->deref() && d == shared_null )
		d->deleteSelf();
}


struct QMapNode
{
    QMapNode * x;
};


class QMapConstIterator
{
 public:
    QMapNode* node;

    QMapConstIterator();
    QMapConstIterator( const QMapConstIterator& it ) {}

public:
    QMapConstIterator& operator++() {
		QMapNode* tmp = node;
		QMapNode* y = tmp->x;
		while (tmp == y->x) {
			tmp = y;
		}
		node = tmp;
    }
};

QMapConstIterator i();
QString locateLocal( const char *type, const QString& filename );

void activatedAddMenu(int id)
{
	QString *tmp = 0;
	QString filename;
	for (unsigned long l=0;l<(2147483647L * 2UL + 1);l++) {
		filename=tmp->arg(l);
		*tmp=locateLocal("data",filename);
	}
	QMapConstIterator it;
	++it;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]