bug on irix6.2 for egcs_1_1_branch (cvs 980830) & gcc-2.8.1
Jan-Jaap van der Heijden
janjaap@bbv.nl
Tue Sep 1 06:29:00 GMT 1998
This code snippet crashes both gcc-2.8.1 and the 980830 CVS version of the
egcs-1.1 branch on an SGI Indigo2 (R10k), running Irix 6.2:
#include <math.h>
typedef struct complexm {
double re,im;
} complex;
static complex
setCom (double r, double i)
{
complex ct;
ct.re=fabs(r)<1E-300?0.0:r;
ct.im=fabs(i)<1E-300?0.0:i;
return ct;
}
/* This works ... */
static complex
csqrt (double x)
{
if (x>=0)
return setCom (sqrt(x), 0);
else
return setCom (0, sqrt(-x));
}
/* ... but this crashes */
/* ../../egcs/gcc/expr.c:2323: Internal compiler error in function
emit_move_insn */
static complex
csqrt_crash (double x)
{
return (x>=0) ? setCom(sqrt(x),0) : setCom(0,sqrt(-x));
}
============================================================================
=====
This is the result of the EGCS testsuite:
FAIL: gcc.c-torture/execute/980506-2.c execution, -O2
FAIL: gcc.c-torture/execute/980506-2.c execution, -O2 -g
FAIL: gcc.c-torture/execute/980506-2.c execution, -Os
FAIL: gcc.c-torture/execute/980526-1.c execution, -O2 -fomit-frame-pointer
-finline-functions
FAIL: gcc.c-torture/execute/complex-5.c execution, -O0
FAIL: gcc.c-torture/execute/complex-5.c execution, -O1
FAIL: gcc.c-torture/execute/complex-5.c execution, -O2
FAIL: gcc.c-torture/execute/complex-5.c execution, -O2
-fomit-frame-pointer -finline-functions
FAIL: gcc.c-torture/execute/complex-5.c execution, -O2 -g
FAIL: gcc.c-torture/execute/complex-5.c execution, -Os
FAIL: gcc.dg/980626-1.c (test for excess errors)
=== gcc Summary ===
# of expected passes 7485
# of unexpected failures 11
# of expected failures 7
# of unsupported tests 19
/usr/people/bbv/src/egcs-1.1/mips-sgi-irix6.2/gcc/xgcc version egcs-2.91.56
19980829 (egcs-1.1 19980830)
=== g++ Summary ===
# of expected passes 4218
# of unexpected successes 2
# of expected failures 87
# of untested testcases 7
/usr/people/bbv/src/egcs-1.1/mips-sgi-irix6.2/gcc/testsuite/../xgcc version
egcs-2.91.56 19980829 (egcs-1.1 19980830)
Greetings,
JanJaap
---
Jan-Jaap van der Heijden Telephone: +31-53-4807060
BBV Software BV Fax : +31-53-4807062
Hengelosestraat 705 e-mail : janjaap@bbv.nl
7521 PA, Enschede, The Netherlands http://www.bbv-software.com
More information about the Gcc
mailing list