This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
2.95: Alpha ev6 float compare problem
- To: gcc-bugs at gcc dot gnu dot org
- Subject: 2.95: Alpha ev6 float compare problem
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Sun, 1 Aug 1999 20:27:52 -0500 (EST)
- Cc: lucier at math dot purdue dot edu, staff at math dot purdue dot edu, wilker at math dot purdue dot edu
The following program dumps core when compiled with
gcc -mieee -mcpu=ev6
with or without -O1 (it bombs later with -O1).
#include <stdio.h>
int main() {
double x = 0.0, y = 0.0;
double z;
z = x/y;
if (z != z)
printf("!= is OK\n");
else
printf("!= is bad\n");
if (z > z)
printf("> is bad\n");
else
printf("> is OK\n");
if (z >= z)
printf(">= is bad\n");
else
printf(">= is OK\n");
}
The problem is that the compare instructions are not issued with the
su suffix. (I was wrong before when I said a following trapb was
needed on the ev6, sorry.) I tried to go through gcc/config/alpha
to find out what the problem is, but I guess that's not a task for
amateurs ;-). It generates correct code with -mcpu=ev5.
Brad Lucier lucier@math.purdue.edu