* alpha egcs-1.0.1 -O2 -mieee internal error--unrecognizable insn
@ 1998-01-12 3:57 Richard Hadsell
0 siblings, 0 replies; 2+ messages in thread
From: Richard Hadsell @ 1998-01-12 3:57 UTC (permalink / raw)
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 <math.h>
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
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <34B994C5.5656@blueskystudios.com>]
* Re: alpha egcs-1.0.1 -O2 -mieee internal error--unrecognizable insn
[not found] <34B994C5.5656@blueskystudios.com>
@ 1998-01-19 23:13 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1998-01-19 23:13 UTC (permalink / raw)
On Sun, Jan 11, 1998 at 10:57:58PM -0500, Richard Hadsell wrote:
> 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
This is fixed by the following patch.
r~
Index: alpha.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -c -p -d -r1.23 -r1.24
*** alpha.c 1998/01/14 23:10:48 1.23
--- alpha.c 1998/01/18 20:15:24 1.24
*************** alpha_handle_trap_shadows (insns)
*** 3718,3725 ****
switch (GET_CODE (i))
{
case INSN:
! /* Annoyingly, get_attr_trap will abort on USE. */
! if (GET_CODE (PATTERN (i)) == USE)
break;
summarize_insn (PATTERN (i), &sum, 0);
--- 3718,3726 ----
switch (GET_CODE (i))
{
case INSN:
! /* Annoyingly, get_attr_trap will abort on these. */
! if (GET_CODE (PATTERN (i)) == USE
! || GET_CODE (PATTERN (i)) == CLOBBER)
break;
summarize_insn (PATTERN (i), &sum, 0);
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-01-19 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-12 3:57 alpha egcs-1.0.1 -O2 -mieee internal error--unrecognizable insn Richard Hadsell
[not found] <34B994C5.5656@blueskystudios.com>
1998-01-19 23:13 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox