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]

egcs1.1 generates bad code on Alpha


Hi!

If I run the program build from the appended files I get the output

	0 1 0 = 0 0 0

which is wrong.

The system is a DEC Alpha with OSF/1 3.2 and egcs is:

Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf3.2/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

The problem does not appear on X86. There are four ways to get rid of
the bug:
	1. compile withou -O2
	2. don't use an inline function for
		G3DVector3<T>& G3DVector3<T>::operator=( const TVector<T,3> &tv )
	3. don't use (const double*) operator in g3dvector.h:49, but
	   tv._data instead.
	4. break the statement in main.cpp:34 into two statements.

Martin Kuball


test.tar.gz


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