2.95: Alpha ev6 float compare problem

Brad Lucier lucier@math.purdue.edu
Sun Aug 1 18:39:00 GMT 1999


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


More information about the Gcc-bugs mailing list