From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199801120333.TAA06683@icarus.icarus.com> Date: Sun, 11 Jan 1998 22:57:58 -0500 From: Richard Hadsell Subject: alpha egcs-1.0.1 -O2 -mieee internal error--unrecognizable insn This is a multi-part message in MIME format. --------------61134A7B31D2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Our egcs-1.0.1 crashes with options -O2 -mieee running on an alpha. I have attached the source and output files, because my mailer would wrap the longer lines, making them difficult to read. I simplified the test case as much as I could. The command line was: g++ -v -O2 -mieee -c egcsbug1.cc >& egcsbug1.out It does not fail with -O1 or without -mieee. -- Dick Hadsell 914-381-8400 Fax: 914-381-9790 Reply-to: hadsell@blueskystudios.com Blue Sky | VIFX http://www.blueskystudios.com 1 South Road, Harrison, NY 10528 --------------61134A7B31D2 Content-Type: text/plain; charset=us-ascii; name="egcsbug1.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="egcsbug1.cc" #include class Vec3 { public: Vec3 () { } Vec3 (const Vec3& v); double dotProduct (const Vec3& v) const; void invert (const Vec3& v); void normalize (const Vec3& v); protected: double x[3]; }; inline Vec3::Vec3 (const Vec3& v) { x[0] = v.x[0]; x[1] = v.x[1]; x[2] = v.x[2]; } inline double Vec3::dotProduct (const Vec3& v) const { return x[0] * v.x[0] + x[1] * v.x[1] + x[2] * v.x[2]; } inline void Vec3::invert (const Vec3& v) { x[0] = -v.x[0]; x[1] = -v.x[1]; x[2] = -v.x[2]; } inline void Vec3::normalize (const Vec3& v) { double norm = v.x[0]*v.x[0] + v.x[1]*v.x[1] + v.x[2]*v.x[2]; if (norm != 1. && norm != 0.) { norm = 1. / sqrt (norm); x[0] = v.x[0] * norm; x[1] = v.x[1] * norm; x[2] = v.x[2] * norm; } else x[0] = v.x[0]; x[1] = v.x[1]; x[2] = v.x[2]; } class A { public: void fun () const; protected: A *next_; Vec3 *inbound_; }; void A::fun () const { A& nxt = *next_; nxt.inbound_ = new Vec3; if (!nxt.next_) { // next to last knot in open curve Vec3 tmp (*inbound_); if (inbound_->dotProduct (tmp) < 0.) nxt.inbound_->invert (*inbound_); else nxt.inbound_->normalize (tmp); } } --------------61134A7B31D2 Content-Type: text/plain; charset=us-ascii; name="egcsbug1.out" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="egcsbug1.out" Reading specs from /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/specs gcc version egcs-2.90.23 980102 (egcs-1.0.1 release) /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix -D__ELF__ -D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -D__linux__ -D__unix__ -D__ELF__ -D__linux -D__unix -Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__EXCEPTIONS -D__OPTIMIZE__ -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus -D_IEEE_FP egcsbug1.cc /tmp/cca16755.ii GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (Alpha Linux/ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include/g++ /usr/local/include /usr/local/alphaev5-unknown-linux-gnu/include /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/include /usr/include End of search list. /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/cc1plus /tmp/cca16755.ii -quiet -dumpbase egcsbug1.cc -mieee -O2 -version -o /tmp/cca16755.s GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (alphaev5-unknown-linux-gnu) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release). egcsbug1.cc: In method `void A::fun() const': egcsbug1.cc:71: internal error--unrecognizable insn: (insn:DI 288 198 188 (clobber (mem:DF (symbol_ref/u:DI ("*$LC2")))) -1 (nil) (nil)) egcsbug1.cc:71: confused by earlier errors, bailing out --------------61134A7B31D2-- -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com